Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

What's the keyword in PB from the keyword "Trunc" in Pascal?

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

  • What's the keyword in PB from the keyword "Trunc" in Pascal?

    Hey Everyone,

    Can tell me what the keyword mains in PB from the keyword "Trunc"
    in Pascal?

    'Expression in Pascal
    '====================

    n:=TRUNC(x-b*INT(x/b));

    'How can I this translated in PB ?

    Thanks
    Stephane

    ------------------
    Brainsoft Programmers

    [This message has been edited by Stephane Fontaine (edited July 28, 2002).]

  • #2
    Say, Stephane, how are you doing on the Delphi-style IDE for PowerBASIC
    that you started writing in 1999? Just curious.

    See the FIX function.

    ------------------
    Tom Hanlin
    PowerBASIC Staff

    Comment


    • #3
      [QUOTE]Originally posted by Tom Hanlin:
      [B]Say, Stephane, how are you doing on the Delphi-style IDE for PowerBASIC
      that you started writing in 1999? Just curious.

      See the FIX function.


      Tom, Thanks for you quickly help
      Stephane

      This is then the right expression?

      I try:

      n = FIX(x - b * INT(x / b))

      Right?


      I'm in holyday !

      ------------------
      Brainsoft Programmers

      Comment


      • #4
        Looks beautiful. If "x" and "b" are Integer types, you might prefer this:
        Code:
        n = FIX(x - b * (x \ b))
        Happy holyday.

        ------------------
        Tom Hanlin
        PowerBASIC Staff

        Comment

        Working...
        X