Goto Label Explanation
-
jdeleon7010
- Posts: 27
- Joined: Thu Jul 26, 2012 2:23 pm
Goto Label Explanation
Hello, I am new to Installaware and need to understand Goto Label. When calling a label, does the script perform every command after the label once called? for example, ill label a routine where i find the file version and name it "filever". 100 lines later, i'll call the label "filever", will it execute 100 lines again and loop?
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Goto Label Explanation
Dear user,
the Goto statement unconditionally transfers the script execution directly to another label statement.
Exactly as it happens with any development language.
Of course if subsequently you have another Goto to the same Label, it can generate a loop.
Regards
the Goto statement unconditionally transfers the script execution directly to another label statement.
Exactly as it happens with any development language.
Of course if subsequently you have another Goto to the same Label, it can generate a loop.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
jdeleon7010
- Posts: 27
- Joined: Thu Jul 26, 2012 2:23 pm
Re: Goto Label Explanation
Thanks for the response, maybe you can help me with this logic.
I am trying to label a routine within an IF statement, but obviously IA cannot have labels within a conditional check. What would be the best way around this?
I am reading a file, I need to read the file until I find specific text that refers to a dynamic value, then pass the value into a variable.
I am trying to label a routine within an IF statement, but obviously IA cannot have labels within a conditional check. What would be the best way around this?
I am reading a file, I need to read the file until I find specific text that refers to a dynamic value, then pass the value into a variable.
-
jdeleon7010
- Posts: 27
- Joined: Thu Jul 26, 2012 2:23 pm
Re: Goto Label Explanation
Also a resposne to your comment, is there a way to break out of a label and continue where the call was made?
-
FrancescoT
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Goto Label Explanation
Dear user,
I suggest you to use a custom script instead of a label.
Just create a new script and place with this, all the specific code that you need to acquire data from a file.
You could use a While statement conditionally to read through the file as:
From the main script call your custom script with:
Hope this helps you.
Regards
I suggest you to use a custom script instead of a label.
Just create a new script and place with this, all the specific code that you need to acquire data from a file.
You could use a While statement conditionally to read through the file as:
Code: Select all
while Variable MYVAR Equals FALSE loop
Comment: PLACE YOUR CODE HERE
wend
Code: Select all
Include Script: MyScript
Hope this helps you.
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

