Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: Brian Alvarez on August 24, 2019, 10:25:16 PM
-
Hello Charles, i wrote this when i was working in the dr mario code, i dont recall mucho but i hope it helps
fixing something?...
MACRO PlaySFX(n)
' Works fine on both (need bycopy, because of byref ASCIIZ).
SndPlaySound(BYCOPY "sfx" & FORMAT$(n), %SND_RESOURCE OR %SND_ASYNC)
' NOTE: This plays in PowerBASIC, no sound in Oxygen.
'SndPlaySound(("sfx" & format$(n)), %SND_RESOURCE Or %SND_ASYNC)
' NOTE: This compiles in PowerBASIC, doesnt compile in Oxygen.
'SndPlaySound(bycopy ("sfx" & format$(n)), %SND_RESOURCE Or %SND_ASYNC)
END MACRO
The above code is before converting to Oxygen, but it is kind of the same i think.
-
Thanks Brian,
bycopy is not necessary, but it gagged on the following bracket. This will be fixed.
function f(char*s)
print s
end function
'
f ("hello1")
f (("hello2"))
f (bycopy "hello3")
f (bycopy ("hello4")) 'fails