syntax error (Release Announcements)

by frank888, Wednesday, January 22, 2014, 21:34 (1190 days ago)
edited by frank888, Wednesday, January 22, 2014, 21:39

Running on 6 core AMD under Ubuntu 12.04

I keep getting (a variety of) syntax errors alerts that I can't explain. Any help would be appreciated.

This example code below that I took from basic256.org results in the output:
Syntax error on line 4 around column 6. It seems that the error msg often points to the opening parenthesis.

Anybody a hint?

Secondly it's a drag that the editor has no line numbers, especially with longer programs.


# c9_gameroller.kbs
# Game Dice Roller
print "die roller"
s = get("sides on the die",6)
n = get("number of die", 2)
total = 0
for x = 1 to n
d = die(s)
print d
total = total + d
next x
print "total "+ total
end
function get(message$, default)
# get a number - if they enter zero
# or enter default to another value
input message$ + " (default " + default + ") ?", n
if n = 0 then n = default
return n
end function
function die(sides)
# roll a die and return 1 to sides
return int(rand*sides)+1
end function

syntax error

by Jim ⌂ @, Russell, KY, Wednesday, January 22, 2014, 22:25 (1190 days ago) @ frank888

Frank.

I believe you are using a very old copy of the language. Line numbers were added in January 2013 for version 0.9.9.42 and subroutines were added before that. What version are you currently running?

Jim

syntax error

by frank888, Wednesday, January 22, 2014, 22:32 (1190 days ago) @ Jim

hmmm. you're right. i have downloaded 1.0.0.7 but it doesn't install on ubuntu 12.04.
I'll give it another try on Win7.

Thanks.

PS the version I initially tried is 0.9.6.66. However this was provided by ubuntu's Software Center. Perhaps offering the latest version to them might be a smart thing to do.


Thanks again.

syntax error

by Jim ⌂ @, Russell, KY, Thursday, January 23, 2014, 03:28 (1189 days ago) @ frank888

The ubuntu PPA was maintained by another fellow and is not being maintained. I will try to contact him to see if I can get access to keep it more current.

If you know somebody who is a PPA maintainer and wants to help... :)

Jim

RSS Feed of thread
powered by my little forum