Can you check for string parameters without a magic number?
|
11-19-2017, 08:00 AM
(This post was last modified: 11-20-2017 06:43 AM by StephenG1CMZ.)
Post: #7
|
|||
|
|||
RE: Can you check for string parameters without a magic number?
(11-19-2017 03:05 AM)TravisE Wrote: If I understand the OP correctly, they want to compare the types without directly using numeric constants. Thanks for that tip. Using IF TYPE(...)==TYPE(1.2) etc. Seems the best way to avoid using constants like 3-1, or even DOM_STRING, which can lead you astray. To avoid having a 1.2 here and a PI there, which would be distracting, I'd perhaps use MY_DOM_FLOAT==TYPE(1.2) IF TYPE(...)==MY_DOM_FLOAT Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« 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)