Announcement

Collapse
No announcement yet.

How to change PB RTL's default behavior for VARIANT variables?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Clay Clear
    replied
    Thanks for the idea, Michael. Sorry for taking so long to reply, just got too much going on right now.

    Leave a comment:


  • Michael Mattias
    replied
    Well, you could always create a MACRO..
    Code:
    MACRO vLet (vVar, num) =  LET vVar = num AS type
    
    ...
       vLet     (vVar, 1234.56)
    Then you could change the "AS type" in the MACRO with impunity......

    Leave a comment:


  • Clay Clear
    replied
    Yup, that's pretty much what I figured, from my own experimenting. Thanks for your reply.

    Leave a comment:


  • Michael Mattias
    replied
    New feature Suggestion?
    Code:
    #VARIANT NUMERIC DEFAULT LONG|R8|SINGLE|DOUBLE|whatever
    Kind of a "DEFINT" for otherwise untyped assignment to variables of type VARIANT.

    BTW, "hooking the runtime" can do no good. All the underlying machine instructions to perform those assignments occur at compile time.

    MCM

    Leave a comment:


  • How to change PB RTL's default behavior for VARIANT variables?

    What I mean is, if an " AS" is not explicitly used when assigning a numeric value to a variant variable, the variant variable defaults to being a VT_R8 type. Most of the numeric work I do is better suited for integer types, not floating number types. So, does anybody know a way I can hook the PB RTL, so to speak, so it uses VT_I8 as its default numeric type for variants rather than using VT_R8 as its default?

    Thanks much for any assistance.
Working...
X