Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 41051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:07:11+00:00 2026-05-10T15:07:11+00:00

I have a large classic ASP app that I have to maintain, and I

  • 0

I have a large classic ASP app that I have to maintain, and I repeatedly find myself thwarted by the lack of short-circuit evaluation capability. E.g., VBScript won’t let you get away with:

if not isNull(Rs('myField')) and Rs('myField') <> 0 then ... 

…because if Rs(‘myField’) is null, you get an error in the second condition, comparing null to 0. So I’ll typically end up doing this instead:

dim myField if isNull(Rs('myField')) then      myField = 0 else     myField = Rs('myField') end if  if myField <> 0 then ... 

Obviously, the verboseness is pretty appalling. Looking around this large code base, the best workaround I’ve found is to use a function the original programmer wrote, called TernaryOp, which basically grafts in ternary operator-like functionality, but I’m still stuck using a temporary variable that would not be necessary in a more full-featured language. Is there a better way? Some super-secret way that short-circuiting really does exist in VBScript?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:07:12+00:00Added an answer on May 10, 2026 at 3:07 pm

    Maybe not the best way, but it certainly works… Also, if you are in vb6 or .net, you can have different methods that cast to proper type too.

    if cint( getVal( rs('blah'), '' ) )<> 0 then   'do something end if   function getVal( v, replacementVal )   if v is nothing then     getVal = replacementVal   else     getVal = v   end if end function 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Your comments say that the code assumes big-endian. Technically you're… May 11, 2026 at 2:17 pm
  • added an answer The Standard answers all questions in section 9.5 of the… May 11, 2026 at 2:17 pm
  • added an answer Personally, I would call your business logic layer services 'BuildingService'… May 11, 2026 at 2:17 pm

Related Questions

I'm working on porting a large vb6 application to .NET. The current app is
ASP.NET MVC has been discussed on this forum a few times. I'm about to
I have a large-ish web project which is migrating from classic ASP to ASP.NET
I have to maintain a large number of classic ASP pages, many of which

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.