better MemStream.readblock

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  12 December 2012
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.
  05 May 2013
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
  05 May 2013
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 12:21 AM.

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