Thread: Mini Games
View Single Post
Old 11-11-2003, 07:21 AM   #15 (permalink)
jimmyoctane
Registered User
 
jimmyoctane's Avatar
 
Join Date: Sep 2003
Location: California
Posts: 26
jimmyoctane is on a distinguished road
Send a message via AIM to jimmyoctane
you asked for it

Sorry I just drove From California to Illinois with a five year old.
(yes he is mine ;) )


This hunk reads a table with user info in it.
It then scans for a "," to seperate the first from last.
ex jimmy, octane.


Code:
C*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 
/free

// Loop through all records of file 
read file;

dow not %eof(file); // Process until end of file
   if %error;
      dsply 'Read error: process aborting.';
      leave;
   else;
      pos = %scan (',': name);
      if pos > 0;
         firstname = %trimr(%subst(name:1:pos-1));
         update file;
      endif;
   read file;
enddo;

/end-free
C*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
jimmyoctane is offline   Reply With Quote