No announcement yet.

Simple question about Equates

  • Filter
  • Time
  • Show
Clear All
new posts

  • Dave Navarro
    Equates are limited to integers or "whole numbers", but the values can be up to quad-integer.

    %a = 100000

    is fine. PowerBASIC stores the value in the fewest number of bytes it can. However you can FORCE any storage method by appending the data type to the numeric literal:

    %a = 100000&


    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:

  • William Fletcher
    Guest started a topic Simple question about Equates

    Simple question about Equates

    Since numeric equates begin with % I assume they are stored with INTEGER precision. Am I wrong?

    I need to make an Equate with LONG precision (for a number > 32,767)? so ...

    1) will %my_equate = 60000 hold the number (after all)?
    2) is &my_equate = 60000 a valid "Long" equate?
    3) do I have to declare 'GLOBAL my_would_have_been_equate = 60000' ?
    4) any suggestions / knowledge is welcome. Please!

    Forgive my ignorance but the help files and the manuals don't seem to bear this out.

    Many TIA ):

    William Fletcher