I need to convert this BBC BASIC lines in SuperBASIC....
LET E=10
LET TIME=50
PRINT "Line:"+STR$(E)+" X "+STR$(TIME)
I would like to obtain this output="Line:10 X 50"
HELP!

That's actually pretty simple in SuperBASIC:genetika wrote:Hi.
I need to convert this BBC BASIC lines in SuperBASIC....
LET E=10
LET TIME=50
PRINT "Line:"+STR$(E)+" X "+STR$(TIME)
I would like to obtain this output="Line:10 X 50"
HELP!
Code: Select all
PRINT "Line:" & E & " X " & TIME
Code: Select all
a$ = "10" : PRINT 1 + a$
Code: Select all
1 DEFine PROCedure IP(device,precision,value)
2 f$=""
3 FOR i = 1 to precision
4 f$ = f$ & "#"
5 END FOR i
6 PRINT_USING#device,f$,value
7 END DEFine IP
Try this: https://superbasic-manual.readthedocs.i ... ht=fdec%24polka wrote:Actually, it is not so simple :
Let's try :
A = 60000000
PRINT#2,A
The QL will answer (on device #2) :
6E7
If you want him to print
60000000
you have to code this little procedure :
and tell the QL :Code: Select all
1 DEFine PROCedure IP(device,precision,value) 2 f$="" 3 FOR i = 1 to precision 4 f$ = f$ & "#" 5 END FOR i 6 PRINT_USING#device,f$,value 7 END DEFine IP
IP(2,8,A)
(2 is the number of the device on which you want the output, and 8 is the number of characters you want to print)
Coercion etc. is "nice", but it lets the QL do what he wants, not what you want.
POLKa