Re: ZX Spectrum BASIC Compiler just released
>[color=blue]
> Tray this and tell me.
> On the other hand, when the compiler reports a syntax error, it's
> related to the text file number, no to the basic line numbers.
> BASIC line numbers ARE ignored and completely useless here (you can
> ommit them). They're only labels useful for GOTO or GOSUB. You can
> also define text labels, with a colon:
>
> mylabel:
> goto mylabel
>
> Seehttp://boriel.com/wiki/en/index.php/ZxBasic:Labels
>
> Regards,
> B.[/color]
I will try the above and report back.
However, with no disrepect to you and your achievement, I think its
fantastic what your doing and support it wholeheartedly, you did sell
this as a ZXbasic then Freebasic compiler, but at the moment, it seems
to support neither directly - hence the problems I am having.
I would like to suggest, and its only a suggestion as it is your baby
at the end of the day, that you concentrate on one dialect of basic
first so it is useable. Currently it is NOT a spectrum compiler (you
posted it in this forum so we assume it runs spectrum programs) as you
say it ignores line numbers, so why include spectrum keywords and not
spectrum programming conventions???
Again, I say, its a great idea to compile basic to a z80 machine -
namely the spectrum (and I love it), so, perhaps I will stay with the
freebasic option instead of the spectrum option as it seems pointless
to me at present.
Regards,
Dicky
Re: ZX Spectrum BASIC Compiler just released
On 13 jun, 23:16, dickydodds <di...@dickydodds.com> wrote:[color=blue]
>
> I will try the above and report back.[/color]
You might find this game example useful:
[url]http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas[/url]
Regards,
J.
Re: ZX Spectrum BASIC Compiler just released
[color=blue]
> You might find this game example useful:[url]http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas[/url]
>
> Regards,
> J.[/color]
OK, thanks for the link. But it must be me - it wont compile! LOL!
I copied and pasted the code from the link, first into FBEdit, saved
and tried compiling - got this error :-
C:\Program Files\ZX Basic Compiler>zxb mycode\zxsnake.bas
yacc: Warning. Token 'ELSE' defined, but not used.
yacc: Warning. There is 1 unused token.
yacc: Warning. Token 'UMINUS' defined, but not used.
yacc: Warning. There is 1 unused token.
zxsnake.bas:165: Unexpected end of file
Pasted into Notepad, saved and tried compiling - got the same error.
It must be me....! What can I possibly be doing wrong? I am on XP
Tablet edition SP2.
Dicky
Re: ZX Spectrum BASIC Compiler just released
On 14 jun, 12:17, dickydodds <di...@dickydodds.com> wrote:[color=blue][color=green]
> > You might find this game example useful:[url]http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas[/url][/color]
>[color=green]
> > Regards,
> > J.[/color]
>
> OK, thanks for the link. But it must be me - it wont compile! LOL!
>
> I copied and pasted the code from the link, first into FBEdit, saved
> and tried compiling - got this error :-
> C:\Program Files\ZX Basic Compiler>zxb mycode\zxsnake.bas
> yacc: Warning. Token 'ELSE' defined, but not used.
> yacc: Warning. There is 1 unused token.
> yacc: Warning. Token 'UMINUS' defined, but not used.
> yacc: Warning. There is 1 unused token.
> zxsnake.bas:165: Unexpected end of file
>
> Pasted into Notepad, saved and tried compiling - got the same error.
>
> It must be me....! What can I possibly be doing wrong? I am on XP
> Tablet edition SP2.
>
> Dicky[/color]
I've copied from the wiki, and it works. Well, I'm under linux. Let me
check the Windows version...
On the other hand, that example file is already include in the /
examples/ directory.
Try to compile that file, please.
Since pack the Windows version importing from a Linux machine, maybe
some file is missing or not updated...
(I'm going to check).
Regards,
J.
Re: ZX Spectrum BASIC Compiler just released
[color=blue]
> I've copied from the wiki, and it works. Well, I'm under linux. Let me
> check the Windows version...
> On the other hand, that example file is already include in the /
> examples/ directory.
> Try to compile that file, please.
>[/color]
ok, downloaded rc6 zip and extracted the examples.
snake_en.bas compiles ok - no problems. Wahaay!
The copied and pasted one looks the same apart from a couple of extra
spaces in 2 places within the freebasic editor. However, if I look at
the files themselves in notepad, snake_en has no CRLF's in it but the
freebasic editor version deos - because its on windows.
Drop me an email by using the "email me" button on my webpage -
[url]www.dickydodds.com[/url] and I will send you the 2 files, zipped, so you can
make a closer inspection. Your webpage deosnt allow attachments.
Thanks for your support so far,
Dicky
Dicky
Re: ZX Spectrum BASIC Compiler just released
On Jun 14, 10:24*pm, dickydodds <di...@dickydodds.com> wrote:[color=blue]
> snake_en.bas compiles ok - no problems. Wahaay!
> The copied and pasted one looks the same apart from a couple of extra
> spaces in 2 places within the freebasic editor. However, if *I look at
> the files themselves in notepad, snake_en has no CRLF's in it but the
> freebasic editor version deos - because its on windows.[/color]
Dicky, I think I've reproduced the problem. It's not the CRLF lines.
Both lines formats (Unix/Dos) are supported.
The problem cames when the source .BAS file does not end in a blank
line.
E.g.
10 PRINT "Hello World"|<EOF>
Won't compile, whilst:
10 PRINT "Hello world"
<EOF>
will do.
Can you try this and tell me if it works now, please?
Regards,
J.
Re: ZX Spectrum BASIC Compiler just released
Thats it!! Well done for finding it.
Its the same issue that used to plague us editing the hosts file in
NT4 - we had to have a blank line there too!
I am glad we got to the bottom of it and thanks for your patience!
Dicky
[color=blue]
> Dicky, I think I've reproduced the problem. It's not the CRLF lines.
> Both lines formats (Unix/Dos) are supported.
> The problem cames when the source .BAS file does not end in a blank
> line.
>
> E.g.
>
> 10 PRINT "Hello World"|<EOF>
>
> Won't compile, whilst:
>
> 10 PRINT "Hello world"
> <EOF>
>
> will do.
>
> Can you try this and tell me if it works now, please?
>
> Regards,
> J.[/color]