Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 07 JAN 2006 05:45:09PM Gerald Lovel wrote:

The documentation says to make the call Set_Status(0) to clear any previous status. I had assumed, therefore, that this call would return with Status=". However, my testing shows that in the expression

Status=Set_Status(0),

Status is being returned as 1. Confusing, isn't it?


At 07 JAN 2006 08:22PM Warren Auyong wrote:

Maybe it comes back as 1 to let you know the operation was successful?


At 07 JAN 2006 08:49PM dsigafoos wrote:

did you check error_flag ?? i agree that it 'appears' off but there have been other functions that are true when would seem false would be correct .. the original oi guys .. and even arev and rev .. didn't map out all the functions and define the return vars .. think it was done on the fly ..

Syntax

status=Set_Status(error_flag, status_code, status_arguments)

error_flag

The termination status of the stored procedure. Valid error_flags are:

Code  Description
  1. 1 Append status_code and status_arguments to the existing list. Do not change error_flag.
0     Procedure terminated normally (clears the status).
1     Procedure terminated abnormally.

At 09 JAN 2006 03:41AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Gerald,

On my system:

   call set_Status( 0 )
   x=get_Status( errorText )

x contains 0. If x contains 1 in your case then I can only assume that there's something else happening. Do you know if this is going through the custom zzx_Set_Status() layer?

The Sprezzatura Group

World leaders in all things RevSoft


At 09 JAN 2006 12:32PM Gerald Lovel wrote:

I suspect I have been misunderstood. The call

Status=Get_Status( Error )

returns status=0 on my system, provided no error has occurred. I am questioning an issue with Set_Status, which is prototyped as a function call in the Revelation documentation. The documentation implies that status is cleared by the call

Status=Set_Status(0)

when in fact the value of status returned by Set_Status is 1. (Or at least, it is "1" when using the zzx_Set_Status() function, as you correctly assume.) Possibly this is just a confusion in how the documentation is written, where "Status" is used to mean multiple things. It did cause me a confusing program bug, however.


At 09 JAN 2006 01:31PM Karen Oland wrote:

It is functioning correctly. The 1 returned from set_status() lets you know that set_status() executed OK. You can ignore this using

 call set_status(0)

or

 set_status(0)

or you can catch the value into any variable:

 ok=set_status(0) 

or

 thisvalueisirrelevant=set_status(0)

any of these set the error code returned from get_status() to zero.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/54f2d05c34d5927b852570ef007cfbf7.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1