HP OpenVMS Systems

ask the wizard
Content starts here

Programming: integers and fractions?

» close window

The Question is:

Im writing a program to add some offsets in.  Is it possible to do math
 adding/subtracting  with decimals..
numbers like  1.2 + 3.5 = 4.7
because i can only get it to add whole numbers..
Thank you..

The Answer is :

  Executable images (programs) written in most (all?) application
  programming languages can certainly perform this task directly,
  but DCL command proceedures cannot -- the DCL command interpreter
  does not provide support for fractions, and programs requiring
  fractions must use a bias (eg: times 10, in this case) or must
  utilize the assistance of an executable image that can perform
  the necessary factional mathematics for the DCL procedure.
  The semantics and capabilities of individual programming languages
  will vary, obviously.

answer written or last revised on ( 30-MAR-2001 )

» close window