Can you check for string parameters without a magic number?
|
11-19-2017, 03:05 AM
(This post was last modified: 11-19-2017 03:14 AM by TravisE.)
Post: #6
|
|||
|
|||
RE: Can you check for string parameters without a magic number?
If I understand the OP correctly, they want to compare the types without directly using numeric constants.
(11-16-2017 07:09 AM)StephenG1CMZ Wrote: Using type instead of TYPE even though I am in PPL not CAS doesnt seem to help From playing around a bit, it looks like it's necessary to: 1. Call the CAS type function with “CAS.type()” 2. Don't subtract 1 from the DOM_* constants you're comparing to (I'm not sure why you're doing that) The PPL TYPE() function appears to returns a different set of values, so comparing its return values to the DOM_* constants isn't appropriate. If you really want to avoid using a magic number there, you could either define your own named constants in your program, or you could possibly use something like: Code:
etc. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Can you check for string parameters without a magic number? - StephenG1CMZ - 11-15-2017, 09:43 PM
RE: Can you check for string parameters without a magic number? - Carlos295pz - 11-16-2017, 12:20 AM
RE: Can you check for string parameters without a magic number? - StephenG1CMZ - 11-16-2017, 07:09 AM
RE: Can you check for string parameters without a magic number? - TravisE - 11-19-2017 03:05 AM
RE: Can you check for string parameters without a magic number? - StephenG1CMZ - 11-19-2017, 08:00 AM
RE: Can you check for string parameters without a magic number? - Carlos295pz - 11-16-2017, 07:28 AM
RE: Can you check for string parameters without a magic number? - Carlos295pz - 11-16-2017, 07:37 AM
RE: Can you check for string parameters without a magic number? - Carlos295pz - 11-20-2017, 04:38 AM
|
User(s) browsing this thread: 1 Guest(s)