Talk:CPC Basic

From CPCWiki - THE Amstrad CPC encyclopedia!
Revision as of 05:39, 25 July 2010 by CPM User (Talk | contribs) (Lets give this Compiler a Go!)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 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!

--CPM User 10:39, 25 July 2010 (UTC)