A partir de la lnea 169 hay una explicacin en espaol.

The English explanation begins at line 333.


ͻ
                        Documentaci en catal                       
ͼ

Per a qu serveix aquesta DLL?


  Aquesta DLL proporciona una funci REXX (Number) per a OS/2 que
  retorna el cardinal d'una quantitat (s a dir, un nmero expressat en
  lletres) en catal, espanyol o angls; pel catal i espanyol el nmero
  es pot obtenir en mascul o femen.                        


Fitxers inclosos


  ejemplo.cmd - exemple d's en espanyol
  exemple.cmd - exemple d's en catal
  file_id.diz - descripci breu
  Numbers.dll - DLL
  numbers.doc - aquest fitxer
  sample.cmd  - exemple d's en angls


Installaci


  Heu de copiar el fitxer NUMBERS.DLL a un dels directoris inclosos a
  LIBPATH, o b incloure el directori on hi ha la DLL en aquest
  parmetre del CONFIG.SYS.


Us


  En ser una funci externa primer cal registrar-la. Per aix crideu la
  funci RxFuncAdd del REXX:

    call RxFuncAdd, 'Number', 'numbers', 'Number'

  La funci NUMBER es crida amb tres parmetres:

  El primer s un nmero (enter, comprs entre 0 i 4.294.967.295).

  El segon s un carcter, que indica el gnere en qu s'ha de donar el
  cardinal:

       'm' per mascul
       'f' per femen

  Aquest parmetre no t cap efecte en pel nmero en angls, per ha de
  ser-hi i ha de ser un dels indicats.

  El tercer s l'idioma en qu s'ha d'obtenir el cardinal:

      'c' per catal
      'e' per espanyol
      'a' per angls

  Per exemple,

    say Number(55422, 'f', 'c')

  dna

    cinquanta-cinc mil quatre-centes vint-i-dues

  Vegeu el fitxer EXEMPLE.CMD per a ms informaci.


Com usar la funci des de DeScribe


  Podeu usar aquesta funci des de qualsevol programa que permeti fer
  servir REXX. Per exemple, des de DeScribe es pot fer amb la segent
  macro:

  -------------inici de la macro per a DeScribe------------------------
  var Numero
  var Genere
  var Idioma

  MACRO DeScribeMacro
      SET MacroDialogTitle to "Nmeros"
      MSET "Nmero a convertir " TOVALUE Numero
      MSET "Gnere (M o F) " TOSTRING Genere
      MSET "Idioma (C, E, A)" TOSTRING Idioma
      MGET "Entreu el nmero, el gnere i l'idioma."
      Set Env0 to Numero
      Set Env1 to Genere
      Set Env2 to Idioma
      Set NumRexxParams to 3
      RunRexxFile "d:\describe\macros\Nombres.cmd"
      Put RexxReturnString
  END MACRO
  ------------------final de la macro per a DeScribe-------------------

  Essent el fitxer d:\describe\macros\Nombres.cmd el segent:

  ------------------inici de nombres.cmd-------------------------------
  /* parmetres proporcionats per la macro de DeScribe */
  parse arg Numero, Genere, Idioma

  /* Registrar la funci, si no ho est */
  if (RxFuncQuery("Number") = 1) then
     call RxFuncAdd "Number", "numbers", "Number"

  /* cridar la funci amb aquests parmetres */
  UnNumero = Number(Numero, Genere, Idioma)

  /* retornar el resultat */
  return UnNumero
  -----------------final de nombres.cmd--------------------------------


Garanties


  No es garanteix, sota cap concepte, que aquesta funci actua tal com
  s'ha descrit.

  En CAP cas l'autor es fa responsable de possibles problemes, prdues
  d'informaci, o qualsevol altre inconvenient que l's d'aquesta DLL
  pugui comportar.


Condicions d's i de distribuci


  Podeu usar i copiar aquesta rutina en qualsevol ordinador.

  Podeu incloure-la en altres programes "freeware" i "shareware" sempre
  que en mencioneu l'autor.

  No inclogueu aquesta rutina en programes comercials sense perms
  escrit de l'autor.


Eines utilitzades


  La programaci s'ha fet amb CSet++ First Step, i la documentaci s'ha
  preparat amb QEdit per OS/2.

  L'objectiu d'aquesta DLL era aprendre a construir-ne. La informaci
  per a aconseguir-ho l'he treta de Revista Profesional para
  Programadores (nmero 4), Dr. Dobb's Journal (setembre 1994) i la
  mateixa ajuda del CSet++ FS.


L'autor


  Podeu contactar amb l'autor, Gabriel Massip, per mitj del correu
  electrnic:

    Internet:   gmassip@abaforum.es
    Fidonet:    2:343/108.42

  S'accepten suggeriments, noves idees i, fins i tot, informaci
  sobre problemes de funcionament!


ͻ
                       Documentacin en espaol                       
ͼ

Para qu sirve esta DLL?


  Esta DLL proporciona una funcin REXX (Number) para OS/2 que devuelve
  el cardinal de una cantidad (es decir, un nmero expresado en letras),
  en espaol, cataln o ingls; para el espaol y cataln el nmero se
  puede obtener en masculino o femenino.


Ficheros includos


  ejemplo.cmd - ejemplo de uso en espaol
  exemple.cmd - ejemplo de uso en cataln
  file_id.diz - descripcin breve
  Numbers.dll - DLL
  numbers.doc - este fichero
  sample.cmd  - ejemplo de uso en ingls


Instalacin


  Copie el fichero NUMBERS.DLL en uno de los directorios includos en
  LIBPATH, o bien incluya el directorio donde reside la DLL en esta
  sentencia del CONFIG.SYS.


Uso


  Al tratarse de una funcin externa primero hay que registrarla. Para
  eso, llame la funcin RxFuncAdd de REXX:

    call RxFuncAdd, 'Number', 'Numbers', 'Number'

  La funcin NUMBER se llama con tres parmetros:

  El primero es un nmero (entero, comprendido entre 0 y 4.294.967.295).

  El segundo es un carcter, que indica el gnero en que se quiere
  obtener el cardinal:

       'm' para masculino
       'f' para femenino

  Este parmetro no tiene ningn efecto para los nmeros en ingls, pero
  debe estar presente y debe ser uno de los indicados.

  El tercero es el idioma en que se quiere obtener el cardinal:

      'e' para espaol
      'c' para cataln
      'a' para ingls

  Por ejemplo,

    say Number(55422, 'f', 'e')

  da

    cincuenta y cinco mil cuatrocientas veintidos

  Para obtener ms informacin, vea el fichero EJEMPLO.CMD.


Como usar la funcin desde DeScribe


  Esta funcin puede usarse desde cualquier programa que permita usar
  REXX. Por ejemplo, desde DeScribe se puede hacer con la siguiente
  macro:

  -------------inicio de la macro para DeScribe-------------------------
  var Numero
  var Genero
  var Idioma

  MACRO DeScribeMacro
      SET MacroDialogTitle to "Nmeros"
      MSET "Nmero a convertir " TOVALUE Numero
      MSET "Gnero (M o F) " TOSTRING Genero
      MSET "Idioma (C, E, A)" TOSTRING Idioma
      MGET "Entre el nmero, el gnero y el idioma."
      Set Env0 to Numero
      Set Env1 to Genero
      Set Env2 to Idioma
      Set NumRexxParams to 3
      RunRexxFile "d:\describe\macros\Numeros.cmd"
      Put RexxReturnString
  END MACRO
  ------------------final de la macro para DeScribe--------------------

  Siendo el fichero d:\describe\macros\Numeros.cmd el siguiente:

  ------------------inicio de numeros.cmd------------------------------
  /* parmetros proporcionados por la macro de DeScribe */
  parse arg Numero, Genero, Idioma

  /* Registrar la funcin, si no lo est */
  if (RxFuncQuery("Number") = 1) then
     call RxFuncAdd "Number", "numbers", "Number"

  /* llamar a la funcin con estos parmetros */
  UnNumero = Number(Numero, Genero, Idioma)

  /* devolver el resultado */
  return UnNumero
  -----------------final de numeros.cmd--------------------------------


Garantas


  No se garantiza, bajo ningn concepto, que esta funcin acta tal y
  como se ha descrito y sin errores.

  En NINGUN caso el autor se responsabiliza de posibles problemas,
  prdidas de informacin, o cualquier otro inconveniente que el uso de
  esta DLL pueda comportar.


Condiciones de uso y distribucin


  Esta rutina puede usarse y copiarse en cualquier ordenador.

  Esta rutina puede incluirse en otros programas "freeware" y
  "shareware", siempre que se mencione su autor.

  No incluya esta rutina en programas comerciales sin permiso escrito
  del autor.


Herramientas utilizadas


  La programacin se ha realizado con CSet++ First Step, y la
  documentacin se ha preparado con QEdit para OS/2.

  El objetivo de esta DLL era aprender a construirlas. Para conseguirlo
  he sacado informacin de la Revista Profesional para Programadores
  (nmero 4), Dr. Dobb's Journal (septiembre 1994) y de la misma ayuda
  del CSet++ FS.


El autor


  Puede contactar con el autor, Gabriel Massip, mediante correo
  electrnico:

    Internet:   gmassip@abaforum.es
    Fidonet:    2:343/108.42

  Se aceptan sugerencias, nuevas ideas y hasta informacin sobre
  problemas de funcionamiento!



ͻ
                        English documentation                         
ͼ

What does this DLL do?


  This DLL implements a REXX function (Number) for OS/2 that returns on
  number expressed in cardinals, it est, in letters, in English, Catalan
  or Spanish; for Catalan and Spanish languages the number can be
  obtained in masculine or feminine.


Included files


  ejemplo.cmd - Spanish sample
  exemple.cmd - Catalan sample
  file_id.diz - short description
  Numbers.dll - DLL
  numbers.doc - this file
  sample.cmd  - English sample


Installation


  You must copy the file NUMBERS.DLL into one directory listed in
  LIBPATH, or include the directory where the DLL resides into this
  CONFIG.SYS sentence.


Use


  This is an external function. So it must be registered before being
  used. To do that, call the REXX RxFuncAdd function:

    call RxFuncAdd, 'Number', 'numbers', 'Number'

  The function NUMBER needs three parameters:
  
  The first one is a number (integer, between  0 and 4,294,967,295).

  The second one is a character, that indicates the gender (masculine or
  feminine) in which the cardinal will be obtained:

       'm' for masculine
       'f' for feminine

  This parameter has no effect when the number is obtained in English,
  but it must be there and must be 'm' or 'f'.

  The third one is the language in which the cardinal will be obtained:

      'a' for English
      'c' for Catalan
      'e' for Spanish

  For example,

    say Number(55422, 'f', 'a')

  returns

    fifty five thousand four hundred twenty two

  See the file SAMPLE.CMD to get more information.


How to use this function from DeScribe


  This function can be used from any program that allows the use of
  REXX. For example, from DeScribe you can use this macro:

  -------------here begins the DeScribe macro--------------------------
  var Number
  var Gender
  var Language

  MACRO DeScribeMacro
      SET MacroDialogTitle to "Numbers"
      MSET "Number to convert " TOVALUE Number
      MSET "Gender (M o F) " TOSTRING Gender
      MSET "Language (C, E, A)" TOSTRING Language
      MGET "Enter the number, the gender and the language."
      Set Env0 to Number
      Set Env1 to Gender
      Set Env2 to Language
      Set NumRexxParams to 3
      RunRexxFile "d:\describe\macros\Numbers.cmd"
      Put RexxReturnString
  END MACRO
  -------------here ends the DeScribe macro----------------------------

  And the file d:\describe\macros\Numbers.cmd is:

  -------------here begins numbers.cmd---------------------------------
  /* parameters supplied by DeScribe's macro */
  parse arg Number, Gender, Language

  /* Register the function, if necessary */
  if (RxFuncQuery("Number") = 1) then
     call RxFuncAdd "Number", "numbers", "Number"

  /* call the function using the parameters */
  OneNumber = Number(Number, Gender, Language)

  /* return the result */
  return OneNumber
  -----------------end of numbers.cmd----------------------------------


Warranties


  The author doesn't warrant, in any form, that this function acts as
  described.

  In NO case the author is responsible of possible problems, information
  losing, or any other dammages caused directly or indirectly by the use
  of this DLL.


Usage and distribution


  This routine can be used and copied in any computer.

  You can include this routine in other freeware or shareware programs
  if you indicate its author.

  Do not include this routine in commercial programs whithout the
  written permission of the author.


Tools


  I've used CSet++ First Step to compile the DLL. The documentation has
  been written using QEdit for OS/2.

  I began to build this DLL in order to learn how to write them. I've
  got the necessary information from Revista Profesional para
  Programadores (issue 4), Dr. Dobb's Journal (september 1994) and from
  the CSet++ FS Help.


The author


  You can contact the author, Gabriel Massip, via electronic mail:

    Internet:   gmassip@abaforum.es
    Fidonet:    2:343/108.42

  Suggestions, new ideas and even bug reports are welcome!
