Hi All
I have just finished writing my first serious vbscript in about....god, 5 years.
I am stuck between:
[Option1]
intGReturn = 1
Call Task A
If Result from Task A is Good
Call Task B
If Result from Task B is Good
Call Task C
...and so on, we all all good
If Result for Task n is Good
intGReturn = 0
...
Wscript.Quit intGReturn
[Option2]
Call Task A (Sub/Function of Task A was a Wscript.Quit 1 given failure)
Call Task B (Sub/Function of Task B was a Wscript.Quit 1 given failure)
Call Task C (Sub/Function of Task C was a Wscript.Quit 1 given failure)
Wscript.Quit 0
I have spent 20 years moving totally towards a Task driven approach to manipulating computer systems, top down Task Sequencing...
I thought I was doing the right thing, it had dawned on me I have just moved to 'Option 2' which my early teaching led me to believe was bad form,,,from a coding perspective.
I am back in the game, but fear I need to spend most of my time in the Powershell forum as vbscript is dead?
Cheers all tek-tips members,,,still the best forum site if you ask me.
I Hear, I Forget
I See, I Remember
I Do, I Understand
Ronald McDonald
I have just finished writing my first serious vbscript in about....god, 5 years.
I am stuck between:
[Option1]
intGReturn = 1
Call Task A
If Result from Task A is Good
Call Task B
If Result from Task B is Good
Call Task C
...and so on, we all all good
If Result for Task n is Good
intGReturn = 0
...
Wscript.Quit intGReturn
[Option2]
Call Task A (Sub/Function of Task A was a Wscript.Quit 1 given failure)
Call Task B (Sub/Function of Task B was a Wscript.Quit 1 given failure)
Call Task C (Sub/Function of Task C was a Wscript.Quit 1 given failure)
Wscript.Quit 0
I have spent 20 years moving totally towards a Task driven approach to manipulating computer systems, top down Task Sequencing...
I thought I was doing the right thing, it had dawned on me I have just moved to 'Option 2' which my early teaching led me to believe was bad form,,,from a coding perspective.
I am back in the game, but fear I need to spend most of my time in the Powershell forum as vbscript is dead?
Cheers all tek-tips members,,,still the best forum site if you ask me.
I Hear, I Forget
I See, I Remember
I Do, I Understand
Ronald McDonald