SuperBASIC function to read a line?

Anything QL Software or Programming Related.
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: SuperBASIC function to read a line?

Post by ql_freak »

GETLINE$() function has been updated to V 0.91.

The original article has been changed and the link to the _bin file has been updated.
- Bugfix: If there were files with more than 32766 chars without LF inside, then the last char of a part string (fetched with 32766 bytes) was truncated as for lines ending with LF.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: SuperBASIC function to read a line?

Post by ql_freak »

Is there no one here, who wants to test my GETLINE$([#chan])-function? I have now a new version (1.0) which allows the buffer size to be specified, and if the function should return the trailing newline (LF); except if EOF() occurs after reading, then a trailing LF will always be returned.

It will be released shortly - because (for me) it is now finished, I will release it on my homepage - and that may take time :-;

p.s.: Puhh! Hard stuff - C#/Java and even C++ is much easier and MUCH, MUCH more comfortable. We should develop a method for writing SB-exts in EJC (produces reentrant, ROMable code).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: SuperBASIC function to read a line?

Post by pjw »

ql_freak wrote:Is there no one here, who wants to test my GETLINE$([#chan])-function?
I looked at your code some time ago. A few people have offered suggestions. I assumed that if youd wanted any input you would have responded to those first.


Per
dont be happy. worry
- ?
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: SuperBASIC function to read a line?

Post by ql_freak »

I have answered to some questions, and of course I have used some of the information in the code for the GETLINE$()-function. The version here is tested and seems to work. What I don't know (as I haven't it currently installed) is,if it works with Turbo and QLiberator and on a real QL (it has been developed and tested under QPC2). Albeit it should work with both (for Turbo the stack must most propably enhanced to about 40 KBytes or more), as I'm only using the maths stack (does Turbo support BV.CHRIX to expand the SuperBASIC stack?) and parameters which don't return a value. The version here supports only an optional channel number and reserves 32774 ($8004) bytes on the S*BASIC stack. I'm currently working at my homepage (make a new QL section), where I will release the final, improved version 1.0.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: SuperBASIC function to read a line?

Post by ql_freak »

My Sinclair QL page is now online (sorry only in German). The new version 1.0 of the GETLINE$() function can be downloaded on my QL download page. The sources and description in the ZIP file are all in English.

EDIT:

NEW: QL download page with GETLINE$() description now also available in English.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: SuperBASIC function to read a line?

Post by ql_freak »

WARNING WARNING WARNING

I have now, thanks to uQLx, tested my GETLINE$ function on Minerva.

Unfortunately it crashes horrible, not even Sysmon is moaning :-(

I don't know if I will find the time to correct it, in near future. uQLx is unfortunately not running very well. At least not on Windows with WSL and XMing.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply