Razzak and all list members,
You mention "The returned value is stored in the STP_RETURN system variable. This option will return an -ERROR- when used outside a Stored Procedure."
I have often wondered how can one test a stored procedure (when it is still in a command format where you have a "RETURN .varname".
Prior to version 6.5 or possibly 6.1a (it was undocumentd ) but you could run ".RMD" file with a "RETURN .varname" without getting an error message. RBase would set return the variable in the MICRORIM_RETURN system variable.
When the "STP_RETURN" system variable was added the undocumented feature went away.
--
Sincerely, Jim Bentley
American Celiac Society
266 Midway Dr
River Ridge LA 70123
email: [EMAIL PROTECTED] Phone: 504-738-6165
-----Original Message----- From: A. Razzak Memon <[EMAIL PROTECTED]> Sent: Wed, 11 May 2005 08:54:54 -0400 To: [email protected] (RBASE-L Mailing List) Subject: [RBASE-L] - Tip of the Day: Controlling the maximum length of RETURNvariable
Tip of the Day: Controlling the maximum length of RETURN variable
Section: Stored Procedures and Triggers
RETURN varname option is used ONLY within a Stored Procedure to return a value.
The returned value is stored in the STP_RETURN system variable. This option will return an -ERROR- when used outside a Stored Procedure. The default is TEXT 8 characters, but if you want more, you can set it to a larger value. You can control the maximum length at procedure definition time, or by editing the SYS_PROC_LEN column in SYS_PROC_COLS system table.
Example 01:
PUT MyTest.PRC AS MyTest P1 INTEGER RETURN TEXT (30) will set the limit for the RETURN value at 30 characters.
Very Best R:egards,
Razzak.

