My project is in Ms Access 2002.
I only want to know ,in Access, is there any function like FLAG or
Label or Go To.
I don't know its name properly.
But in C or C++ we use this function to jump at perticular line in
this is just example code is not working.this is just sample to show
what i want?.
Originally Posted by
1 x=some string
5 go to LabelA
7 some code
9 some code
23 print("string match");
I though goto's were supposedly the spawn of the devil and not allowed in serious development languages like C and its imitators and successors. It wa always one of the sneering comments from developers in C that basic isn't a real language as it allows jumps to labels.
So, having been beaten round the head so many times for using labels in the past (and I've still got the scars to prove it) I'd re-write the code using appropriate control structures so that you never jump to a label (unless you are using error trapping)
the only construct I'd use which doesn't follow that approach is the exit function/sub statements (say the data caused a validation fail.. I often kick out using that to make it clear that we don't go near this function if the data is invalid. Or exit if statements/ exit loop when the the work id done. but usually on a loop I'd set trip a flag to indicate processign is finished and treat it exactly as if it were a property such
as do while .eof
in file processing, Id use something like
Do while StayinLoop
putting labels in risks having the dreaded spaghetti approach and can make the code a lot harder to comprehend. At least thats what sneering C,C++ self styled 'real' developers always told me.