Re: [NEWBIE] [CODE] file_length() and Parsing Thu, May 11, 2000 at 10:44:11PM +0930

From: Oleg V. Volkov (cm_rover@lglobus.ru)
Date: 05/11/00


On Thu, May 11, 2000 at 10:44:11PM +0930, Jarratt Davis wrote:
> Thanks very muchly for pointing that out - I wouldnt have noticed
> till I actually tried to compile it on UN*X of someflavour.  My comments
> in that file were simply from my poking around in stdio.h in the MSVC5
> includes directory and also /usr/include on a reasonably recent version of
> FreeBSD.  The old brain isnt working too well at this point in time :P
> Next step is to reqrite the parsing system for my ascii files..
> My old one read from the files direct which of course is a bad way to go.
> Well on my laptop it is anyway :)  My old function that interprets stuff
> like:
> ImAString ("You enter a large room /(My isnt it bright in here for such a
> large indoors room/).  You see a sign that says, /"Welcome adventurer/".")
> Now the way this was written it would read in the file byte by byte,
> remembering the byte that came before so it could recognise "control"
> characters such as /" /( /) as well as (" and ").  What I want to know is
> this really the way I have to go or can I do it another way without slow
> things down to byte by byte parsing?  Or should I just make my ASCII

Better way is to read by strings and then analyze byte-by-byte since
memory is much faster.

--
Oleg V. Volkov aka Rover                                       EH: CM Rover
Join Elite Imperial Fleet!                    http://www.emperorshammer.org
Get Paid to Surf, Play Games and more...
http://www.spedia.net/cgi-bin/dir/tz.cgi?run=show_svc&fl=8&vid=347166
E-mail redirector: sr-13@mail.ru (always up)                  -=/ SR 13 /=-


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT