conditional termination of a sequence started with beginseq(x)


ekanderson

Recommended Posts

Currently have sequences that are called as functions with conditional return(). Most are passed NO parameters.

I'm trying to debug a series of sequences.

Question is how do I conditionally "terminate" a sequence that is started with "beginseq(xx)"?

Since it is NOT called as a function, "return()" doesn't seem appropriate, altho this text from "help" implies a return of some sort is appropriate. It is unclear to me whether this applies to a sequence that is started with "beginseq()".

"You can also use endseq to end the current sequence. Just reference the current sequence by name inside the endseq() statement. That said, it is better to use the return statement for this otherwise you can't copy your code or rename the sequence without changing these lines".

Just out of curiosity: Can a sequence declared as "function mysequence()" also be used with a "beginseq(mysequence)"????????? if it returns no parameters.

thanks

Link to comment
Share on other sites

DAQFactory isn't that picky. If you start a sequence with beginseq(), you can stop it from within just by doing "return". A sequence with a function prototype at the top can still be started with beginseq. Technically you can even have parameters in the function prototype as long as you realize that none of them will be set if you do beginseq() to start the sequence, so you'd have to use the argc variable to check (or isempty()). Likewise, you can do return(x) from a sequence started with beginseq() but x won't go anywhere.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.