Precompiler

  • YOUScript has the same style precompiller as C and C++ do.
  • We can set pre-compiller flags
#set shouldprint totaly
  • And we can define strings to replace
#define our_string "hello"

#if shouldprint == totaly
        print(our_string)
#end

#set shouldprint no
#if shouldprint == totaly
        error("won't happen")
#else
        print(our_string)
#end

#set shouldprint no
#if shouldprint == totaly
        error("won't happen")
#else
        print(our_string)
#end
  • this will output “hello hello hello” you can also unset the value
#unset shouldprint