#Print

Monkey Forums/Monkey Programming/#Print

Shagwana(Posted 2011) [#1]
What does #Print do?

It is listed in the docs in the preprocessor section but nothing said on what it does.


muddy_shoes(Posted 2011) [#2]
I would guess that #Print and #Error are meant to be used to help debug branching builds, printing a message during compile and printing a message and halting compilation respectively. Neither appear to work though.


therevills(Posted 2011) [#3]
Neither appear to work though.



Works okay for me, when running the following code you get a print statement if the target isnt HTML5 and an error if it is:

#If TARGET="html5" 
#Error "HTML5 is not supported"
#Else
#Print "Not HTML5 - ROCK ON!"
#End

Function Main:Int()
End



muddy_shoes(Posted 2011) [#4]
You're right. My fault. I didn't put quotes around the message I tried.


Shagwana(Posted 2011) [#5]
I see, it shows it between Parsing and Semanting.

If you put it in a update loop, it wont show - hence why its a pre-processor