chenna.deepa
6th May 2008, 13:58
Hi all,

i want to check whether a subsession is saved or not from main session...
this can be done with flag variable ..but dont want to use it...
as

in subsession:
main.table.io:
after.write:
flag = 0
flag = flag + 1
export("flag",flag)

in main session:
choice.end.program:
after.choice:
if flag<> 1 then
message("subsession not saved")


can anyone tell me the other way of doing it.......without using flags

thanks in advance
deepa

mark_h
6th May 2008, 15:23
I have to ask why? You would still have to check something, so why not a flag variable? Or why not just force a save in the subsession and then you do not have to check a flag in the main session.

zardoz
6th May 2008, 19:09
Use the flag, but use it properly:

in subsession:


.....
before.program:
flag = FALSE
.....
main.table.io:
after.write:
flag = TRUE
.....


in main session:


....
import("flag", flag)
if not flag then
....


There is no need to add 1 to flag, just set it to true. The export is done automatically, but not the import...