×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

anguage of style

anguage of style

anguage of style

(OP)
Hi All smile
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

RE: anguage of style

(OP)
...i think the pattern is to just avoid the nesting, also avoid the Wscript.Quits in each Function, then i dont offend delicate sensibilities

I Hear, I Forget
I See, I Remember
I Do, I Understand

Ronald McDonald

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close