better MemStream.readblock

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 12 December 2012   #16
Originally Posted by lo: I'm not sure what you mean. I just meant you could do this:

local pat = "(*"
while not ms.eos() and not matchPattern token pattern:pat do
		token = ms.readToken()


Like you did with the other symbols.


got you now,
fixed it to something even simpler:
while not ms.eos() and not token[1] == p1 do


Thanks again.
 
Old 05 May 2013   #17
I was about to write this very thing... thank you for saving me the time!

Here is a slight improvement:


fn readBlock2 ms p1:"(" p2:")" =
 (
...
)
 


This way the user can set the start and end tokens like in the MemStream.readBlock() method.
__________________
Shawn Olson
Autodesk Expert Elite
3ds Max Charter Member

Developer of:
Wall Worm Tools for the Source Game Engine
CorVex Level Design Plugin
 
Old 05 May 2013   #18
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:15 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.