Re: description of "int_flag"
Posted in 2004
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hello, thanks for the answer; but i can't find useful information in the manual (the manual only describes that the int_flag is set TRUE when ...) But what about the lifecycle of this variable in an application or part of an program ? Erik "June C. Hunt" <june_c_hunt@hotmail.com> schrieb im Newsbeitrag news:2heemkFbovepU1@uni-berlin.de... > Erik Kurz wrote: > > hi, > > > > where can i find a description of "int_flag" > > (how is it used by informix, has it the same value > > in different instances, ...) > > > > perhaps someone has a link for me > > > > thanks > > > > erik > > > You are using Informix 4GL? See the manuals at > http://www.ibm.com/informix/pubs/library/lists.html. > > Briefly, "int_flag" is a built-in global variable that is used as a flag to > note that an interrupt has been issued by a user. See the I4GL Reference > manual for full details. > > -- > June Hunt > >
Erik Kurz wrote: > thanks for the answer; but i can't find useful information > in the manual (the manual only describes that the int_flag > is set TRUE when ...) It is set to FALSE when you program it. It is only set at all if you have executed DEFER INTERRUPT, and you can only write DEFER INTERRUPT in MAIN (not in any other function). > But what about the lifecycle of this variable in an application > or part of an program ? At startup, it is zero or FALSE. It stays that way until you (a) DEFER INTERRUPT and (b) the user hits the interrupt key. At that point, it becomes TRUE, and it stays that way until you do something about it. More uses of the interrupt key leave it just a TRUE as it was after the first one (unless there are bugs in the interrupt code, as on some early Linux ports of I4GL). There's nothing much more to be said, in theory. In practice, you tend to do LET INT_FLAG = FALSE ...interactive statement, such as MENU or INPUT... IF INT_FLAG THEN ...the user probably wanted you to stop... ...handle this appropriately... LET INT_FLAG = FALSE END IF It is surprisingly hard to interrupt a report. > "June C. Hunt" <june_c_hunt@hotmail.com> schrieb: >>Erik Kurz wrote: >>>where can i find a description of "int_flag" >>>(how is it used by informix, has it the same value >>>in different instances, ...) >> >>You are using Informix 4GL? See the manuals at >>http://www.ibm.com/informix/pubs/library/lists.html. >> >> Briefly, "int_flag" is a built-in global variable that is used as >> a flag to note that an interrupt has been issued by a user. See >> the I4GL Reference manual for full details. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
Not quite sure what more you want than is in the manual. int_flag is effectively a boolean. You set it to "FALSE" at the start of your application. As the manual says the flag is set to "TRUE " if someone hits the interupt key. You can then test to see if anyone has pressed the interrupt key. You then need to manually reset the flag back to "FALSE" again. At no stage will the flag ever be set back to FALSE without you setting it in the application. Does this help? "Erik Kurz" <erik.kurz@analytika.at> wrote in message news:<40b2ed04$1@e-post.inode.at>... > Hello, > > thanks for the answer; but i can't find useful information > in the manual (the manual only describes that the int_flag > is set TRUE when ...) > > But what about the lifecycle of this variable in an application > or part of an program ? > > Erik > > > > "June C. Hunt" <june_c_hunt@hotmail.com> schrieb im Newsbeitrag > news:2heemkFbovepU1@uni-berlin.de... > > Erik Kurz wrote: > > > hi, > > > > > > where can i find a description of "int_flag" > > > (how is it used by informix, has it the same value > > > in different instances, ...) > > > > > > perhaps someone has a link for me > > > > > > thanks > > > > > > erik > > > > > > You are using Informix 4GL? See the manuals at > > http://www.ibm.com/informix/pubs/library/lists.html. > > > > Briefly, "int_flag" is a built-in global variable that is used as a flag > to > > note that an interrupt has been issued by a user. See the I4GL Reference > > manual for full details. > > > > -- > > June Hunt > > > >
Erik Kurz wrote: > Hello, > > thanks for the answer; but i can't find useful information > in the manual (the manual only describes that the int_flag > is set TRUE when ...) True, the manual does not give a full explanation for int_flag in one definition statement. To get a complete picture, you will have to take a look at all portions of the manual where int_flag is described or used in an example. > But what about the lifecycle of this variable in an application > or part of an program ? If you are looking at the Informix 4GL Reference, Version 7.31 (Part No. 000-8776), int_flag first appears on page 2-18. The following comes from the manual, and I hope it answers your question about the 'lifecycle of this variable': ... Truly global in scope ... are the names of the constants NOTFOUND, TRUE and FALSE, and built-in variables like status, int_flag, quit_flag, and the SQLCA record. These predefined identifiers do not need to be declared. Unless you declare a conflicting identifier, they are visible in any 4GL statement, and can be referenced from any 4GL module... Jonathan and scottishpoet have both described how the variable is set and used. The manual also gives plenty of examples. Does this help? Just a side note - Jonathan also said: "It is surprisingly hard to interrupt a report." From my experience, he is absolutely correct. The SQL INTERRUPT option is somewhat helpful there, but if the report is short or otherwise fast-running, it didn't much matter as the report finished before the interrupt could be handled. > Erik > > > "June C. Hunt" <june_c_hunt@hotmail.com> schrieb im Newsbeitrag > news:2heemkFbovepU1@uni-berlin.de... > > Erik Kurz wrote: > > > hi, > > > > > > where can i find a description of "int_flag" > > > (how is it used by informix, has it the same value > > > in different instances, ...) > > > > > > perhaps someone has a link for me > > > > > > thanks > > > > > > erik > > > > > > You are using Informix 4GL? See the manuals at > > http://www.ibm.com/informix/pubs/library/lists.html. > > > > Briefly, "int_flag" is a built-in global variable that is used as a flag to > > note that an interrupt has been issued by a user. See the I4GL Reference > > manual for full details. -- June Hunt