TIP: Click on subject to list as thread! ANSI
echo: os2user-l
to: All
from: Herbert Rosenau
date: 2003-09-21 18:20:30
subject: Re: Little REXX File Reading

In-Reply-To: 
From: Herbert Rosenau 
@Mime-Version: 1.0
@Mailing-List: list os2user{at}yahoogroups.com; contact os2user-owner{at}yahoogroups.com
@Delivered-To: mailing list os2user{at}yahoogroups.com
@Precedence: bulk
@List-Unsubscribe: 
@Date: Mon, 22 Sep 2003 00:20:30 +0200
Subject: Re: Little REXX File Reading
Reply-To: os2user{at}yahoogroups.com
@Content-Type: text/plain; charset=US-ASCII
@Content-Transfer-Encoding: 7bit

Don[ald] O. Woodall wrote:
> Hello REXX Coders
> 
>      I am wondering if I can do a little double teaming on
> reading input from a file.
> 
>      Here is sample file and my proposed file format.
> 
> ;
> ;         The name of this file is"  Properties.List
> ;
> 1. CHANGE LIST
> ALWAYSSORT=NO
> BACKGROUND=(none),,,C,255 255 245
> ICONVIEW=NONGRID,NONFLOWED,NORMAL
> 
> 2. MASTER LIST
> ALWAYSSORT=YES
> ALWAYSSORT=NO
> CCVIEW=DEFAULT
> 
>      What I am thinking of doing is:
> 
>   1. Linein
>   2. Charin
>     3. If Char = ; or 1
>        then Linein
>     4. If Char = " "
>        then done
>     5. If Char = any character
>        then || line to string and || ";" to string also
> 
>      OK, so I have to work on the semicolon logic a little so the number
> of semicolons = Lines -1.

Not too bad but

do while linees()  0	/* 0 = EOF reached,  0 for compatibility! */
                         /* because other REXX may give the number of 
unreaded lines instead of constant 1 */
    line = linein()      /* get a line */
    if line = ' ' then leave   /* done */
    line = strip(line)	/* remove leading and trailing blanks */
    if line = "" then iterate  /* line is empty */
    if substr(line, 1,1)  ';' then do
       /* do something with the line */
    end
end

looks better


-- 
Tschau/Bye

Herbert Rosenau
EDV Beratung & Programmierung
Lindelbrunnstr. 53a
76767 Hagenbach

Tel: 49-7273-919416
Fax: 49-7273-93072                     http://www.dv-rosenau.de/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Upgrade to 128-Bit SSL Security!
http://us.click.yahoo.com/p7cEmB/s7qGAA/yigFAA/E8folB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
os2user-unsubscribe{at}yahoogroups.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



---
* Origin: Waldo's Place USA Internet Gateway (1:3634/1000)
SEEN-BY: 633/267 270
@PATH: 3634/1000 12 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.