You are here

Linux

Benjamin's picture

Text and Numbers in Arrays

Forums: 
SmallBASIC implementations: 

I am using FLTK SmallBASIC on lubuntu 12.10.

I ran the following (pointless) program:

DIM A(6)
LET A(1) = 1
LET A(2) = "Benjamin"
LET A(3) = 25
LET A(4) = 5
LET A(5) = A(0)
LET A(6) = 355999
FOR I = 0 TO 6
PRINT A(I)
NEXT I
END

And got this result:

0
1
enjamin
25
5
0
3555999

As you can see, the "B" in "Benjamin" is missing. I then replaced the third line with

LET A(2) = " Benjamin"

which produced

Benjaminn

Benjamin's picture

Text Highlighting

Forums: 
SmallBASIC implementations: 

I am using FTLK SmallBASIC 0.10.7 on lubuntu 12.10.

According to the View/Text Color/Operators drop down menu, operators (such as * and +) are supposed to be a bronze color (0.50,0.50,0.25), but instead they are black, just like variables. Does the menu need to be changed, or the behavior of the program?

Thanks,

Benjamin

Benjamin's picture

ENVIRON

Forums: 
SmallBASIC implementations: 

I am running FTLK SmallBASIC 0.10.7 on lubuntu 12.10.

If you run this:

ENVIRON("")

with no PRINT statement, SmallBASIC crashes instead of giving an error message.

Benjamin's picture

BEEP

Forums: 
SmallBASIC implementations: 

I am using FLTK Version 0.10.7 on an HP Pavilion g series laptop running lubuntu 12.10.

The BEEP statement does not work. It makes NO sound.

Benjamin's picture

FUNCy Problem

SmallBASIC implementations: 

I was experimenting with FUNC, and found something rather strange. When I ran the following (simple) program,

PRINT DOSTUFF(5,10)
END

FUNC DOSTUFF(Param1,Param2)
LOCAL Result
LET Result = Param1 + Param2
LET DOSTUFF = Result
END

I got an output of 10. I couldn't figure out why SmallBASIC didn't seem to see the value in Param1, so I inserted a couple of PRINT statements after the LOCAL statement:

PRINT Param1
PRINT Param2

and my output was

5
10
10

Pages

Subscribe to RSS - Linux