Spinroot

A forum for Spin users

You are not logged in.

#1 Re: General » Scope for labels again » 2012-10-26 19:57:19

I can confirm this works great in 6.2 and is extremely useful

#2 Re: General » goto's in inlines » 2012-10-26 19:24:42

I can see this was addressed in http://spinroot.com/fluxbb/viewtopic.php?id=159.  I was using Spin 6.1.0.  Now that I've upgraded to 6.2, this works perfectly!  Thanks so much!!!

#3 General » goto's in inlines » 2012-10-26 16:00:45

dschumann
Replies: 3

Hi All!  First post on spinroot.com!

Any tips on what to do about using GOTO statements in inlines?  I see that the spin parser has the concept of a Unique Inline ID (uiid) that it applies to labels, so that I can use the label "FOO" in inline "myFunction1" and also in "myFunction2" and those are two separate labels.  But, if I want to call "myFunction1" twice in a proctype, then FOO becomes a duplicated label.

I've written a Perl script that preprocesses my model to deal with this by duplicating my inlines for each time they're called; but is there a better way?  Should I be focusing instead on removing the use of GOTO in my inline by using state variables or something like that?  (Specifically I want to simulate a "return" statement.)

Thanks

Board footer

Powered by FluxBB