Begining BS2 Programming - Input Data
Archiver
Posts: 46,084
Hi All:
I'm just getting into BS2 projects (granted I am challenged when it
comes to program writing and electronics but I am reading Scott
Edwards Programming the BASIC Stamp book) and I am working on an
application where I want to be able to do the following:
1) The program will ask me for inputs. For example "Please input the
number of waypoints". I want to be able to input a number and have
the BS2 program store the number for comparison at a later stage in
the program. How would I set this up and what commands should I use ?
2) I have tried to understand how to set up an array but don't get
it. From my old college days an array was a storage are for data (i.e
columns and rows). Is the BASIC BS2 definition the same as an array
as I know it ? Also, how would I set up an array to be able store (n)
number or rows and columns ?
If anyone can help me I sure would apperciate it ?
Thanks...JB
I'm just getting into BS2 projects (granted I am challenged when it
comes to program writing and electronics but I am reading Scott
Edwards Programming the BASIC Stamp book) and I am working on an
application where I want to be able to do the following:
1) The program will ask me for inputs. For example "Please input the
number of waypoints". I want to be able to input a number and have
the BS2 program store the number for comparison at a later stage in
the program. How would I set this up and what commands should I use ?
2) I have tried to understand how to set up an array but don't get
it. From my old college days an array was a storage are for data (i.e
columns and rows). Is the BASIC BS2 definition the same as an array
as I know it ? Also, how would I set up an array to be able store (n)
number or rows and columns ?
If anyone can help me I sure would apperciate it ?
Thanks...JB
Comments
JBRobertsman@a... writes:
> ) The program will ask me for inputs. For example "Please input the
> number of waypoints". I want to be able to input a number and have
> the BS2 program store the number for comparison at a later stage in
> the program. How would I set this up and what commands should I use ?
>
>
For JB
Write
N9600 con 16468
com bar byte
serout 16, N9600, [noparse][[/noparse]"Enter number of waypoints", cr]
Message will appear on debug screen
serin 16, N9600, [noparse][[/noparse]com]
From the keyboard, enter a number. It will be stored in the variable "com".
Sid Weaver
W4EKQ
Port Richey, FL
[noparse][[/noparse]Non-text portions of this message have been removed]
com var byte
Sid
[noparse][[/noparse]Non-text portions of this message have been removed]
Thanks for replying to my question. It helped alot. I have a problem
though. When I try to a store a digit with 2 digits...say 10 or 11 it
only stores the 1 digit for the value COM. It then truncates the last
digit...ANy ideas ? Thanks..JB
--- In basicstamps@y..., Newzed@a... wrote:
> Sorry - typo.
>
> com var byte
>
> Sid
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]