PropBasic - I am lost
camelot2
Posts: 54
I am trying to multiply 3x10 and display the result
on the serial terminal included in BST. What gets
displayed is 6 !!! Can someone please tell me what
I am doing wrong? thanks for your help
I am using BST ver 0.19.3 and PropBasic ver 1.14
This is my program:
DEVICE P8X32A, XTAL1, PLL16X
XIN 5_000_000
BAUD CON "T115200" ' Baud rate for PC communications
TX PIN 30 HIGH ' Output pin for PC communications
ascii HUB STRING(20)
ans VAR LONG
PROGRAM Start
Start:
ans = 3 * 10
ascii = STR ans,10,1
SEROUT TX, BAUD, ascii ' Send to terminal
END
on the serial terminal included in BST. What gets
displayed is 6 !!! Can someone please tell me what
I am doing wrong? thanks for your help
I am using BST ver 0.19.3 and PropBasic ver 1.14
This is my program:
DEVICE P8X32A, XTAL1, PLL16X
XIN 5_000_000
BAUD CON "T115200" ' Baud rate for PC communications
TX PIN 30 HIGH ' Output pin for PC communications
ascii HUB STRING(20)
ans VAR LONG
PROGRAM Start
Start:
ans = 3 * 10
ascii = STR ans,10,1
SEROUT TX, BAUD, ascii ' Send to terminal
END
Comments
Yes there is bug in the multiply of older versions of PropBasic.
I recommend using PropBasic for Viewport from this thread http://forums.parallax.com/showthread.php?135678
Using Viewport as the IDE allows me make changes to the compiler without having to have someone else integrate them (like BST does).
Bean