ScriptBasic
May 22, 2012, 02:04:07 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: The ScriptBasic User, Developer and extension module guides are available at the
WIKI
.
Home
Wiki
Help
Search
Login
Register
ScriptBasic
>
Open Forum
>
Round Table
>
Possible Bugs
Pages: [
1
]
« previous
next »
Print
Author
Topic: Possible Bugs (Read 624 times)
dons333
Newbie
Posts: 4
Possible Bugs
«
on:
November 04, 2010, 09:45:39 PM »
I have a small segment of code as follows:
1 print "This program adds times\n"
2 print "Format HH.MM\n"
3 print "Enter \"x\" to quit\n"
4
5 i = 0
6 a[ i ] = "a"
7
8 while (a[ i ] <> "x")
9 print "Enter time ", i, " :"
10 line input a[ i ]
11 a[ i ]=chomp (a[ i ])
12 print a[ i ],"\n"
13 strgg = a[ i ]
14 i += 1
15 wend
16
17 for j = 0 to i-1
18 print a[ j ], "\n"
19 next
I added the line numbers for reference. They are omited from the actual execution code.
The
while
construct on line 8 does not seem to recognize the array script. However, when I substitute
a[ i ]
with the variable
strgg
in lines 6 and 8, things work fine. Is this a bug, or did I enter the line wrong?
Thanks, dons333
Logged
support
Administrator
Posts: 409
Re: Possible Bugs
«
Reply #1 on:
November 05, 2010, 10:54:46 AM »
Don,
This works for me.
Code:
a[1]=""
WHILE a[1] <> "x"
LINE INPUT a[1]
a[1]=CHOMP(a[1])
WEND
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Open Forum
-----------------------------
=> Round Table
=> What's New
-----------------------------
ScriptBasic
-----------------------------
=> Download
=> Tutorials
=> Wish List
-----------------------------
Support
-----------------------------
=> General Discussions
=> Installation
=> ScriptBasic Examples w/source
=> Debugger
=> Source
=> Documentation
-----------------------------
Extension Modules
-----------------------------
=> Extension Modules
===> DVM
===> Curl
===> mxml
===> IUP
===> CGI
===> MySQL
===> ODBC
===> Berkeley DB
===> PSQL
===> GSL
===> Rlib
===> GTK-Server
===> CIO
===> NT
===> DYC
===> ZLIB
===> RE
===> HASH
===> GD
===> MT
===> T
===> DBG
Loading...