Changes

Talk:CPC Basic

1,598 bytes added, 10:39, 25 July 2010
Lets give this Compiler a Go!
== Lets give this Compiler a Go! ==

In my mind compilers / programming languages are only made for one reason - to make programs from them.

Just seems to be such a waste to see so many of them out there which seem to have "No Programs" which were
generated using that program. I hate to say it but this looks like another, but someone has gone to the trouble
of making something which would allow people to make something, and it looks interersting.

Unfortunately I'm having trouble with this one though - here's the program I'm trying to compile.

'''DEFBYTE n
DIM w(5)
RESTORE myinf
FOR n = 1 to 5
READ w$(n)
PRINT w$(n)
next
end
myinf DATA "Hello"'''

But it's giving me this n is not defined rubbish following my FOR statement! :o I've defined "n" as a byte on the
first line, so I'm so confused about what this program wants! I've gone to so much trouble and done a million
things just to have it say "hello" and it's not working out! :(

I've gone over their manual and have used Google Languages to
[http://translate.google.com.au/translate?js=y&prev=_t&hl=en&ie=UTF-8&layout=1&eotf=1&u=http%3A%2F%2Fwww.telefonica.net%2Fweb2%2Femilioguerrero%2FCPCBasic2FCPCBasic.pdf&sl=es&tl=en Translate their Guide], and while I thought I was
getting somewhere, this is a Brick Wall. Naturally it's been so long since I've done this and that wouldn't normally
be doing it that way, though it was also unhappy about:

'''DEFSTR n
name="Hello"
PRINT name'''

which comes from the horses mouth! :o

Would certainally love some of their examples!

--[[User:CPM User|CPM User]] 10:39, 25 July 2010 (UTC)
423
edits