Forum
Usage of print42? - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+--- Thread: Usage of print42? (/showthread.php?tid=915)



Usage of print42? - GusmanB - 02-01-2020

Hi.

I'm trying to use the print42 library but whenever I reference it my program can no longer compile, I get a "Undeclared variable printAt42Coords"

I have found an old thread from 2015 with the same problem which was solved, I have tried the -o0 optimization level but it does not make a difference.

Any idea?

Also, I see the print42 routine includes a "isAt:" label that checks for a char 22, what would be the correct syntax to use it?

Cheers.


RE: Usage of print42? - boriel - 02-02-2020

What compiler version are you using?


RE: Usage of print42? - GusmanB - 02-02-2020

(02-02-2020, 07:24 PM)boriel Wrote: What compiler version are you using?

zxb 1.9.8

BTW, I have managed to get it to work changing the place of printat42, if I place it after the print42 function it compiles. It's like it doesn't recognizes the label because it's below in other function.


RE: Usage of print42? - boriel - 02-02-2020

But aren't you using
Code:
#include <print42.bas>
at the beginning of your code?


RE: Usage of print42? - GusmanB - 02-02-2020

(02-02-2020, 11:08 PM)boriel Wrote: But aren't you using
Code:
#include <print42.bas>
at the beginning of your code?


Yes, I'm using it, I have modified the print42.bas to get it to work, that's what I mean.


RE: Usage of print42? - boriel - 02-02-2020

I haven't modified print42.bas at all.
This little program compiles and works ok:

Code:
#include <print42.bas>
print42("this is a test")

If you are getting errors, please provide a short code snippet so I can test it's not a bug. Smile
Thanks