Listing of program r31_eurocvrt.cgi

#! /usr/local/bin/regina
/*  Simple EURO converter: process data from p30_eurocvrt          */
/* Input variables :                                               */
/*     what        : 'e2f', 'f2e' ....                             */
/*     how_much    : amount of money to be converted               */
/* Output          : a 'minimum' web page with the result          */
/*-----------------------------------------------------------------*/


call setdll    /* loads the HHNS shared library */

how_much = 0   /* in case nothing was entered in the field 'how much' */

/*--- this will setup the Rexx variables 'what' and 'how_much'    ---*/
call CgiInit "TITLE='A simple Euro coverter' BGCOLOR=FFFFFF"


select
    /* sorry chaps, I just remember 1 FF = 0.1515 Euro, 1 DM = 3.35 FF, 1 FF = 20 Pes.  */
    when what = "e2f" then  k = format(how_much /  0.1515       , 7, 2)    "FF"
    when what = "f2e" then  k = format(how_much *  0.1515       , 7, 2)    "Euros"
    when what = "e2d" then  k = format(how_much /  0.1515/3.35  , 7, 2)    "DM"
    when what = "d2e" then  k = format(how_much *  (0.1515/3.35), 7, 2)    "Euros"
    when what = "e2p" then  k = format(how_much /  0.1515*5     , 7, 2)    "Pes."
    when what = "p2e" then  k = format(how_much *  (0.1515*5)   , 7, 2)    "Euros"
end

say  "makes about" k     /* a (poor) web page */

call CgiEnd


return 0


Back   Home