English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 08 October 2015, 00:59   #1
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,678
Length of CON/stdin buffer?

Due to certain circumstances, I'm using the QUEUE command in an ARexx script to process input from several files. The QUEUE command puts a string at the end the console buffer (PUSH puts it at the top instead). This functionality may be used to put clean-up DOS commands at the tail of an ARexx script (it's what it's demonstrated for in several sources), but whatever is QUEUEd or PUSHed may also be read using PARSE PULL, or even by ReadLn(stdin).

This solution has been working well, until a source file of considerable (well...) length was queued, where it turns out that only the first circa 75 lines ended up in the queue.

Is this a limitation in ARexx, DOS or CON:, and can it be circumvented?
idrougge is offline  
Old 11 October 2015, 08:07   #2
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,678
Let me tentatively answer my own question: It's CON:.

I usually run KingCON, but for testing, I tried to run the script in a plain shell, and it plain didn't work. Lines() consequently reported zero lines in the buffer.

I looked up Lines() in "Mastering ARexx" (Bruce Smith Books), and it said that it relied on the ConMan handler. Turns out that ConMan is William Hawes' invention, just like ARexx. I skipped ConMan, instead installing WShell 2.0 (also by Hawes), and the script worked flawlessly, without throwing away any queued lines.

So it looks like any support for QUEUE, PUSH and Lines() in KingCON merely happened by chance, and shouldn't be relied on. I have no idea what VincED might do under these circumstances.
idrougge is offline  
Old 11 October 2015, 18:15   #3
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,110
In ARexx.guide I found this for LINES() function description:

Quote:
NOTE: This function requires the 2.0+ AmigaShell, WShell, or another shell managed by ConMan.
More details under link: "PUSH, QUEUE and REXX data-stream I/O"

I guess VincED also support it but I don`t know because I use KingCON. You may ask THOR about this.
daxb is offline  
Old 12 October 2015, 06:53   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,678
The note about AmigaShell doesn't seem to hold true.

Try this out in a standard shell and compare with any replacement console handler:

Code:
/* rexx */
arg max#
do #=1 to max#
   say #
   queue #
   end
say 'Queued' lines() 'lines.'
do while lines()>0
   pull #
   say #
   end
idrougge is offline  
Old 12 October 2015, 16:32   #5
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,110
Yep, they differ. The solution seems to be to don`t use or care about Amiga Shell because there is no reason for it. The replacement Shells are much better to use. If someone sticks with it he/she has to live with it.

I found this in KingCON history:
Quote:
* The ARexx-commands Queue, Push and Lines can now be used in a KingCON-window. They all use some of the many undocumented features of CON:. For example, WaitForChar() returns the number of lines in the console's internal readbuffer in IoErr().
THOR surely could enlighten all about.
daxb is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WANTED: a FPU for this board MA1208 by Bio-Con jailer MarketPlace 6 17 January 2009 00:23
Uncle D's Con-Sound-Tration (very rare!) Doranwen support.Games 2 25 June 2008 11:21
Mission Con-Bat Galaxy request.Old Rare Games 2 19 September 2005 16:20
Amiga Wolfenstien!! Can i con you :) synchro Amiga scene 40 31 July 2004 02:51
con: mtb support.WinUAE 5 28 February 2004 15:55

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:10.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.06296 seconds with 13 queries