[Robelle-l] Calling all keeners

Neil Armstrong neil@robelle.com
Mon, 14 Apr 2003 11:47:16 -0400


Dear Robelle-L,

We just finished a very interesting enhancement to
Suprtool, which we want some keen people to test for
us.

The feature we want tested is a new function called
$number, which will take a free-form "number" and
use it as a display field.

Here are the change notice docs to describe this
feature. If you are interested in trying this
feature out then please e-mail me back at neil@robelle.com.

This is the last pre-release of Suprtool, prior to
production release for Suprtool 4.7. Here are the draft docs
for the new feature:

$Number Function If and Extract

Suprtool now has the ability  to  accept  free-form  "numbers"  as
display data types.  This means number in the form:

  1234.45-
  -12345
  -123.2134
   12343
   $123.45-

can now be accepted and converted to any other numeric data type.

Consider the following data:

   Item-number    New-Price
    12345          +123.45
    34563          + 27.5
    21312          +  1.545

Suprtool  can now read and convert the data in New-Price using the
number function.  Let's say we  want  New-Price  to  be  a  double
integer  and  currently  occupies eight bytes starting in position
six.

Here  is  the  task  you  would  use  to  convert  the   New-Price
free-format number into a double integer.

   >in mynums
   >def item-number,1,5,byte
   >def new-price-ascii,6,8,display
   >def new-price,1,4,double
   >item new-price-ascii,dec,2
   >item new-price,dec,2
   >ext item-number
   >ext new-price=$number(new-price-ascii)
   >out somefile,link
   >xeq


The  $number  function  take  the free-format number and make it a
valid display number.  It will determine the decimal, sign and add
leading zeroes.  It will round the number to the defined number of
decimal places.

In the case of 1.545 number, Suprtool will round the value  to  be
1.55,  since  the  given  number  of decimal places is two and the
preceding value is five or greater.  If you have  a  whole  number
such as 54, with no decimal point the value becomes 54.00.

Suprtool will not accept data that has:

    More than one sign.
    More than one decimal place.
    Spaces in between numbers.
    Signs that are in between numbers.
    Characters that are not over punch characters.
    Fields that when edited do not fit in the defined space for the
display field.

You can control the character that defines the currency,  thousand
and  decimal  symbol  for  other  currencies and formats using the
following commands:

    >set decimalsymbol "."
    >set thousandsymbol ","
    >set currencysymbol "$"

Suprtool in the above case will strip the  currency  and  thousand
symbols  and  use  the  decimal  symbol to determine the number of
decimal places.  You can set these characters to  any  values  you
want but the defaults for each are used in the above set commands.

Sincerely,


Neil Armstrong
Suprtool Architect