From: "The Librarian"
Comment to:Joe Souza
Thanks for the example Joe. I appreciate your response.
Skip]
YOUR MESSAGE WAS:
>The key word here, which you yourself use, is "proc". Just define a
>proc in the source file, and call it like any other TSE function.
>Here's an example:
>
>proc mClearReadOnly(string filename)
>
> if not SetFileAttr(filename, 0)
> Warn("Error clearing file attributes.")
> else
> Message("Read-Only file attribute has been cleared.")
> endif
>
>end
>
>And you would just call this from elsewhere in your code, as in this
>example:
>
> Warn("About to call subfunction")
> mClearReadOnly(CurrFilename())
> Warn("After return from subfunction")
>
>You see, GOSUB in BASIC is really the equivalent to function calls in
>lower level languages.
>
>Good luck,
>-Joe
>
>
----------
From: The Librarian[SMTP:sg@peganet.com]
Sent: Tuesday, October 21, 1997 4:00 AM
To: tsepro@semware.com
Subject: GoSub
Hey Gang,
Periodically I use Goto Label in my macros. What I'd like to do is be
able to return like the old gosub in Apple Basic. Does anyone have
any
idea how that particular proc would be written?
Just in case I'm not clear. Say you write Goto Label and then after
writing the label, you want to return to the calling location and one
line down.
Thanks,
Skip
>
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|