About POS - 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: About POS (/showthread.php?tid=205) |
About POS - programandala.net - 04-18-2010 I just needed the POS function to adapt a code of mine from FreeBASIC... But I didn't suspect POS is already defined in ZX Basic! I realized when the compiler halted: it seems two POS functions are too much By the way, this was my definition: Code: #define systemSPOSN 23688 First I made some tests, because I wasn't sure if the object code produced by the compiler uses the ROM routines and so the related system variables are updated as well. I find out the content of the S POSN system variable is not the same when the same code is executed by Sinclair Basic or compiled by ZX Basic: Code: #define systemSPOSN 23688 Yes, the same program in Sinclair Basic returns lower values. It's interesting. Anyway, it's great POS already exists. I took a look at its source file and the rest of library files. There are many interesting undocumented functions. I created the POS page in the wiki. Re: About POS - boriel - 04-18-2010 programandala.net Wrote:I just needed the POS function to adapt a code of mine from FreeBASIC... But I didn't suspect POS is already defined in ZX Basic! I realized when the compiler halted: it seems two POS functions are too much Thank you very much! ;-) That's the wiki is for. I was thinking we should put required #include line also, shouldn't we? Re: About POS - programandala.net - 04-18-2010 boriel Wrote:I was thinking we should put required #include line also, shouldn't we? At first I didn't understand what you mean... Then I realized I was compiling with the --sinclair option. I tried without it, and POS was not avalaible any more By the way, why is it considered a Sinclair Basic issue? I supossed the --sinclair option added only some Sinclair Basic specific commands, like POINT and others. Anyway, of course the wiki should include the needed #include or option for every external command. I think we should define standard sections for every page. The FreeBASIC docs uses: Syntax, Usage, Parameters, Return value, Description, Example, Differences with QB (Sinclair Basic for us), See also... Some of them are redundant in many pages. A clear and updated documentation is very important in order to use the program. Since I'm writing a complex program in ZX Basic, I'm willing to work on the wiki at the same time. Re: About POS - boriel - 04-18-2010 programandala.net Wrote:boriel Wrote:I was thinking we should put required #include line also, shouldn't we? What --sinclair does is just include all the libraries containing SCREEN$, POINT and ATTR functions. But these libraries also contain POS and COL among other functions. Perhaps we should place these function (POS, COL) into another file? Re: About POS - programandala.net - 04-18-2010 boriel Wrote:What --sinclair does is just include all the libraries containing SCREEN$, POINT and ATTR functions. But these libraries also contain POS and COL among other functions. Perhaps we should place these function (POS, COL) into another file? I think so. They have nothing to do with Sinclair Basic. Re: About POS - britlion - 04-20-2010 I hope they work. I included them under "library things" :-) <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:Library#Library">http://www.boriel.com/wiki/en/index.php ... ry#Library</a><!-- m --> |