Question on printing variables to the console #26
-
In this post you made https://www.reddit.com/r/Tf2Scripts/comments/im624x/scalu_a_programming_language_for_configuration/ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Good catch, I don't mention this very well in the documentation. There's 2 methods. There's the debug operator
Will print the value of I've been too busy to write a standard library, where the 2nd alternative would have gone, but you can quite simply implement
While verbose, this is very fast, as jump determines which block to execute by scanning the bits of |
Beta Was this translation helpful? Give feedback.
Good catch, I don't mention this very well in the documentation.
There's 2 methods. There's the debug operator
?
, which when used like:a = ?a
Will print the value of
a
to the console, but in binary.I've been too busy to write a standard library, where the 2nd alternative would have gone, but you can quite simply implement
print
yourself.While verbose, this is very fast, as jump determines which block to execute by scanning the bits of
a
; it can be as fast as a single comparison. Then, I'd generally recommend setting the value ofa
with whatever value you want to examine rather than creating this service for every …