Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Brian Alvarez on December 14, 2018, 06:25:32 PM
-
This has been giving me trouble. apparently Oxygen hates when UDT variables are passed as macro parameters and commits suicide.
SOMEUDT u1
A_MACRO(u1, b, c, d)
It consistently crashes. even worse when its an array of UDT's.
Please give it a check when you can? If not too difficult?
I am trying to implement TYPE SET.
-
Example:
'Generated with PluriBASIC 6.0.74371.0
$ filename "MACROUDTS.exe"
uses rtl64
TYPE UDT1
CHAR x[12]
END TYPE
MACRO SOMEMACRO(a)
END MACRO
UDT1 u1
somemacro(u1)
FUNCTION PBMAIN() AS INT
INT _FUNCTION = 0
END FUNCTION
PBMAIN() ' invoke entry point
-
Oddly, in some of my bigger examples, using UDTs in macros are completely fine, so, something else must be fixing the issue.
-
Wow. Actually this is also crashing:
$ filename "MACROUDTS.exe"
uses rtl64
macro somemacro(u1)
end macro
long a
somemacro(a)
Maybe empty macros are killing it... this fixes the crash for normal variables:
macro somemacro(u1)
u1 = 1
end macro
-
Hi Brian,
There was a substitution problem with empty macros.
Now Fixed:
https://github.com/Charles-Pegge/OxygenBasic/blob/master/OXSC181215.zip
-
Thanks charles! You are a trouper :)