For example:
WHILE 1 'Start infinite loop
IF BUTTON() AND #LEFT THEN:X=X-1
IF BUTTON() AND #RIGHT THEN:X=X+1
IF BUTTON() AND #UP THEN:Y=Y-1
IF BUTTON() AND #DOWN THEN:Y=Y+1
LOCATE X,Y:?"@";
'Moves text cursor to X,Y and prints @ without adding a line break
VSYNC 'Wait a frame
WEND 'End infinite loop
Issac, there's no difference between 16 and #A. Constants (the # things) just make your code more readable.
PRINT #A -> 16
PRINT 16 -> 16
Party rock, what are you trying to make happen?
Found a bug with the calculator, it thinks 5e2 is a variable when it's actually 5*10^2
Also, I might try to rewrite V360Calc because the GUI has become impossible to manage. (should use DATA instead of a bunch of SPBTN_SET and SPOFS statements)
Interestingly, the bottom screen takes the leftover sprites (512-# on top screen) and background layers (4-# on top screen). For example, if you did "XSCREEN 3,512,3", the top screen will get 512 sprites and 3 background layers, as usual. However, the bottom screen receives only 0 sprites and 1 background layer! If you use "XSCREEN 3,0,0", then the bottom screen will get all 512 sprites and 4 bg.
(continued)
IF I>3 THEN:PRINT "Hello, world!":IF I>4 THEN:PRINT "Sample text":ENDIF:PRINT "Hi"
(you don't need to put an ENDIF on your if statement unless you want to put something after the if)
This is completely okay:
IF I>3 THEN
PRINT "A"
IF I>4 THEN:PRINT "B"
ENDIF
This is not okay (afaik, but it looks awful and you shouldn't use it):
IF I>3 THEN:PRINT "A":IF I>4 THEN
PRINT "B"
ENDIF
Just for reference:
There are 2 kinds of if statements: single-line and multi-line. Single-line if statements look like this:
IF I>3 THEN:PRINT "Hello, world!": ELSE:PRINT "No"
Multi-line if statements look like this:
IF I>3 THEN
PRINT "Hello, world!"
ELSE
PRINT "No"
ENDIF
(note the ENDIF)
You can also use ENDIF in single-line if statements while nesting them.
(continued)
@12Me21 & Hanzo Sure, the only problem is where I'm going to put the , key. (maybe 2nd+e?)
Also, side note: this editor automatically changes stuff like 2Sin(x) into 2*Sin(x), so it's pretty much impossible to cause a syntax error.
As soon as I sent it, they returned it with a yellow post-it attached saying "We're sorry, this unit is not eligible for free repairs because it's cursed."
I booted it again and saw this screen. Any tips?