Using 'procedure' 'sub' 'function' 'as' to improve readability of macros: (The original syntax is still valid)
macro procedure
macro procedure mm (a,b,c)
print a+b+c
end macro
'
mm(1,2,3)
macro function
macro function mm as int (retv,a,b,c)
retv=a+b+c
end macro
'
print mm(1,2,3)
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic.zip
o2 Macros also support default values:
macro function mm as int (retv,a=1,b=10,c=100)
retv=a+b+c
end macro
print mm(2) 'result 112
I've also extended function syntax slightly:
The as specifier can go to the left of the prototype as well as to the right:
Standard function:
function ff a(int a,b,c) as long
return a+b+c
end function
print ff(1,2,3)
New alternative:
function ff as long (int a,b,c)
return a+b+c
end function
print ff(1,2,3)
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OxygenBasic.zip