ZX Spectrum BASIC Compiler just released - Sinclair

This is a discussion on ZX Spectrum BASIC Compiler just released - Sinclair ; > > 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 ...

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 21 to 27 of 27

Thread: ZX Spectrum BASIC Compiler just released

  1. Re: ZX Spectrum BASIC Compiler just released

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


    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


  2. Re: ZX Spectrum BASIC Compiler just released

    On 13 jun, 23:16, dickydodds wrote:
    >
    > I will try the above and report back.


    You might find this game example useful:
    http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas

    Regards,
    J.

  3. Re: ZX Spectrum BASIC Compiler just released


    > You might find this game example useful:http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas
    >
    > Regards,
    > J.


    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

  4. Re: ZX Spectrum BASIC Compiler just released

    On 14 jun, 12:17, dickydodds wrote:
    > > You might find this game example useful:http://boriel.com/wiki/en/index.php/ZxBasic:Snake.Bas

    >
    > > Regards,
    > > J.

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


    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.

  5. Re: ZX Spectrum BASIC Compiler just released


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

    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 -
    www.dickydodds.com 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


  6. Re: ZX Spectrum BASIC Compiler just released

    On Jun 14, 10:24*pm, dickydodds wrote:
    > 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.


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

    Won't compile, whilst:

    10 PRINT "Hello world"


    will do.

    Can you try this and tell me if it works now, please?

    Regards,
    J.

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

    > 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"|
    >
    > Won't compile, whilst:
    >
    > 10 PRINT "Hello world"
    >
    >
    > will do.
    >
    > Can you try this and tell me if it works now, please?
    >
    > Regards,
    > J.



+ Reply to Thread
Page 2 of 2 FirstFirst 1 2