SCOUG-HELP Mailing List Archives
Return to [ 28 | 
July | 
2003 ]
<< Previous Message << 
 >> Next Message >>
 
 
 
=====================================================  
If you are responding to someone asking for help who  
may not be a member of this list, be sure to use the  
REPLY TO ALL feature of your email program.  
=====================================================  
 
In <3F25AE45.510@peterskye.com>, on 07/28/03   
   at 04:13 PM, Peter Skye  said:  
>> Just write it in 5 lines of REXX and be done with it. :-)  
>>   
>>   do while chars('inFile') >= 83  
>>     x = charin('InFile',,83)  
>>     call lineout 'outFile', x  
>>   end  
>>   say 'I did not bother to read the last' chars('inFile') 'characters'  
>>   
>> The speed should be good enough.  
 
>I made it a generic program -- 130 lines with command line parameters for  
>source, target and record length plus full error checking.  CharIn()  
>worked fine, thanks.  
 
A few more seconds of thought says the loop logic can probably be better  
written as:  
 
  c = chars('inFile')  
  b = charin('inFile',,c)  
  call stream 'inFile', 'C', 'CLOSE'  
  do i = 1 to c by 83  
   call lineout 'outFile', substr(b, i, 83)  
 end  
 
It should be a measurably quicker.  
 
Steven  
 
--   
----------------------------------------------------------------------  
"Steven Levine"   MR2/ICE 2.37 #10183 Warp4/FP15/14.093c_W4  
www.scoug.com irc.webbnet.info irc.fyrelizard.org #scoug (Wed 7pm PST)  
----------------------------------------------------------------------  
 
=====================================================  
 
To unsubscribe from this list, send an email message  
to "steward@scoug.com". In the body of the message,  
put the command "unsubscribe scoug-help".  
 
For problems, contact the list owner at  
"rollin@scoug.com".  
 
=====================================================  
 
  
<< Previous Message << 
 >> Next Message >>
Return to [ 28 | 
July | 
2003 ] 
  
  
The Southern California OS/2 User Group
 P.O. Box 26904
 Santa Ana, CA  92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group.  ALL RIGHTS 
RESERVED. 
 
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International 
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
 
   |