home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / numbr11.zip / numbers.doc < prev    next >
Text File  |  1996-05-19  |  15KB  |  491 lines

  1. A partir de la línea 169 hay una explicación en español.
  2.  
  3. The English explanation begins at line 333.
  4.  
  5.  
  6. ╔═════════════════════════════════════════════════════════════════════╗
  7. ║                        Documentació en català                       ║
  8. ╚═════════════════════════════════════════════════════════════════════╝
  9.  
  10. Per a què serveix aquesta DLL?
  11. ───────────────────────────────────────────────────────────────────────
  12.  
  13.   Aquesta DLL proporciona una funció REXX (Number) per a OS/2 que
  14.   retorna el cardinal d'una quantitat (és a dir, un número expressat en
  15.   lletres) en català, espanyol o anglès; pel català i espanyol el número
  16.   es pot obtenir en masculí o femení.                        
  17.  
  18.  
  19. Fitxers inclosos
  20. ───────────────────────────────────────────────────────────────────────
  21.  
  22.   ejemplo.cmd - exemple d'ús en espanyol
  23.   exemple.cmd - exemple d'ús en català
  24.   file_id.diz - descripció breu
  25.   Numbers.dll - DLL
  26.   numbers.doc - aquest fitxer
  27.   sample.cmd  - exemple d'ús en anglès
  28.  
  29.  
  30. Instal·lació
  31. ───────────────────────────────────────────────────────────────────────
  32.  
  33.   Heu de copiar el fitxer NUMBERS.DLL a un dels directoris inclosos a
  34.   LIBPATH, o bé incloure el directori on hi ha la DLL en aquest
  35.   paràmetre del CONFIG.SYS.
  36.  
  37.  
  38. Us
  39. ───────────────────────────────────────────────────────────────────────
  40.  
  41.   En ser una funció externa primer cal registrar-la. Per això crideu la
  42.   funció RxFuncAdd del REXX:
  43.  
  44.     call RxFuncAdd, 'Number', 'numbers', 'Number'
  45.  
  46.   La funció NUMBER es crida amb tres paràmetres:
  47.  
  48.   El primer és un número (enter, comprès entre 0 i 4.294.967.295).
  49.  
  50.   El segon és un caràcter, que indica el gènere en què s'ha de donar el
  51.   cardinal:
  52.  
  53.        'm' per masculí
  54.        'f' per femení
  55.  
  56.   Aquest paràmetre no té cap efecte en pel número en anglès, però ha de
  57.   ser-hi i ha de ser un dels indicats.
  58.  
  59.   El tercer és l'idioma en què s'ha d'obtenir el cardinal:
  60.  
  61.       'c' per català
  62.       'e' per espanyol
  63.       'a' per anglès
  64.  
  65.   Per exemple,
  66.  
  67.     say Number(55422, 'f', 'c')
  68.  
  69.   dóna
  70.  
  71.     cinquanta-cinc mil quatre-centes vint-i-dues
  72.  
  73.   Vegeu el fitxer EXEMPLE.CMD per a més informació.
  74.  
  75.  
  76. Com usar la funció des de DeScribe
  77. ───────────────────────────────────────────────────────────────────────
  78.  
  79.   Podeu usar aquesta funció des de qualsevol programa que permeti fer
  80.   servir REXX. Per exemple, des de DeScribe es pot fer amb la següent
  81.   macro:
  82.  
  83.   -------------inici de la macro per a DeScribe------------------------
  84.   var Numero
  85.   var Genere
  86.   var Idioma
  87.  
  88.   MACRO DeScribeMacro
  89.       SET MacroDialogTitle to "Números"
  90.       MSET "Número a convertir " TOVALUE Numero
  91.       MSET "Gènere (M o F) " TOSTRING Genere
  92.       MSET "Idioma (C, E, A)" TOSTRING Idioma
  93.       MGET "Entreu el número, el gènere i l'idioma."
  94.       Set Env0 to Numero
  95.       Set Env1 to Genere
  96.       Set Env2 to Idioma
  97.       Set NumRexxParams to 3
  98.       RunRexxFile "d:\describe\macros\Nombres.cmd"
  99.       Put RexxReturnString
  100.   END MACRO
  101.   ------------------final de la macro per a DeScribe-------------------
  102.  
  103.   Essent el fitxer d:\describe\macros\Nombres.cmd el següent:
  104.  
  105.   ------------------inici de nombres.cmd-------------------------------
  106.   /* paràmetres proporcionats per la macro de DeScribe */
  107.   parse arg Numero, Genere, Idioma
  108.  
  109.   /* Registrar la funció, si no ho està */
  110.   if (RxFuncQuery("Number") = 1) then
  111.      call RxFuncAdd "Number", "numbers", "Number"
  112.  
  113.   /* cridar la funció amb aquests paràmetres */
  114.   UnNumero = Number(Numero, Genere, Idioma)
  115.  
  116.   /* retornar el resultat */
  117.   return UnNumero
  118.   -----------------final de nombres.cmd--------------------------------
  119.  
  120.  
  121. Garanties
  122. ───────────────────────────────────────────────────────────────────────
  123.  
  124.   No es garanteix, sota cap concepte, que aquesta funció actua tal com
  125.   s'ha descrit.
  126.  
  127.   En CAP cas l'autor es fa responsable de possibles problemes, pèrdues
  128.   d'informació, o qualsevol altre inconvenient que l'ús d'aquesta DLL
  129.   pugui comportar.
  130.  
  131.  
  132. Condicions d'ús i de distribució
  133. ───────────────────────────────────────────────────────────────────────
  134.  
  135.   Podeu usar i copiar aquesta rutina en qualsevol ordinador.
  136.  
  137.   Podeu incloure-la en altres programes "freeware" i "shareware" sempre
  138.   que en mencioneu l'autor.
  139.  
  140.   No inclogueu aquesta rutina en programes comercials sense permís
  141.   escrit de l'autor.
  142.  
  143.  
  144. Eines utilitzades
  145. ───────────────────────────────────────────────────────────────────────
  146.  
  147.   La programació s'ha fet amb CSet++ First Step, i la documentació s'ha
  148.   preparat amb QEdit per OS/2.
  149.  
  150.   L'objectiu d'aquesta DLL era aprendre a construir-ne. La informació
  151.   per a aconseguir-ho l'he treta de Revista Profesional para
  152.   Programadores (número 4), Dr. Dobb's Journal (setembre 1994) i la
  153.   mateixa ajuda del CSet++ FS.
  154.  
  155.  
  156. L'autor
  157. ───────────────────────────────────────────────────────────────────────
  158.  
  159.   Podeu contactar amb l'autor, Gabriel Massip, per mitjà del correu
  160.   electrònic:
  161.  
  162.     Internet:   gmassip@abaforum.es
  163.     Fidonet:    2:343/108.42
  164.  
  165.   S'accepten suggeriments, noves idees i, fins i tot, informació
  166.   sobre problemes de funcionament!
  167.  
  168.  
  169. ╔══════════════════════════════════════════════════════════════════════╗
  170. ║                       Documentación en español                       ║
  171. ╚══════════════════════════════════════════════════════════════════════╝
  172.  
  173. ¿Para qué sirve esta DLL?
  174. ───────────────────────────────────────────────────────────────────────
  175.  
  176.   Esta DLL proporciona una función REXX (Number) para OS/2 que devuelve
  177.   el cardinal de una cantidad (es decir, un número expresado en letras),
  178.   en español, catalán o inglés; para el español y catalán el número se
  179.   puede obtener en masculino o femenino.
  180.  
  181.  
  182. Ficheros incluídos
  183. ───────────────────────────────────────────────────────────────────────
  184.  
  185.   ejemplo.cmd - ejemplo de uso en español
  186.   exemple.cmd - ejemplo de uso en catalán
  187.   file_id.diz - descripción breve
  188.   Numbers.dll - DLL
  189.   numbers.doc - este fichero
  190.   sample.cmd  - ejemplo de uso en inglés
  191.  
  192.  
  193. Instalación
  194. ───────────────────────────────────────────────────────────────────────
  195.  
  196.   Copie el fichero NUMBERS.DLL en uno de los directorios incluídos en
  197.   LIBPATH, o bien incluya el directorio donde reside la DLL en esta
  198.   sentencia del CONFIG.SYS.
  199.  
  200.  
  201. Uso
  202. ───────────────────────────────────────────────────────────────────────
  203.  
  204.   Al tratarse de una función externa primero hay que registrarla. Para
  205.   eso, llame la función RxFuncAdd de REXX:
  206.  
  207.     call RxFuncAdd, 'Number', 'Numbers', 'Number'
  208.  
  209.   La función NUMBER se llama con tres parámetros:
  210.  
  211.   El primero es un número (entero, comprendido entre 0 y 4.294.967.295).
  212.  
  213.   El segundo es un carácter, que indica el género en que se quiere
  214.   obtener el cardinal:
  215.  
  216.        'm' para masculino
  217.        'f' para femenino
  218.  
  219.   Este parámetro no tiene ningún efecto para los números en inglés, pero
  220.   debe estar presente y debe ser uno de los indicados.
  221.  
  222.   El tercero es el idioma en que se quiere obtener el cardinal:
  223.  
  224.       'e' para español
  225.       'c' para catalán
  226.       'a' para inglés
  227.  
  228.   Por ejemplo,
  229.  
  230.     say Number(55422, 'f', 'e')
  231.  
  232.   da
  233.  
  234.     cincuenta y cinco mil cuatrocientas veintidos
  235.  
  236.   Para obtener más información, vea el fichero EJEMPLO.CMD.
  237.  
  238.  
  239. Como usar la función desde DeScribe
  240. ───────────────────────────────────────────────────────────────────────
  241.  
  242.   Esta función puede usarse desde cualquier programa que permita usar
  243.   REXX. Por ejemplo, desde DeScribe se puede hacer con la siguiente
  244.   macro:
  245.  
  246.   -------------inicio de la macro para DeScribe-------------------------
  247.   var Numero
  248.   var Genero
  249.   var Idioma
  250.  
  251.   MACRO DeScribeMacro
  252.       SET MacroDialogTitle to "Números"
  253.       MSET "Número a convertir " TOVALUE Numero
  254.       MSET "Género (M o F) " TOSTRING Genero
  255.       MSET "Idioma (C, E, A)" TOSTRING Idioma
  256.       MGET "Entre el número, el género y el idioma."
  257.       Set Env0 to Numero
  258.       Set Env1 to Genero
  259.       Set Env2 to Idioma
  260.       Set NumRexxParams to 3
  261.       RunRexxFile "d:\describe\macros\Numeros.cmd"
  262.       Put RexxReturnString
  263.   END MACRO
  264.   ------------------final de la macro para DeScribe--------------------
  265.  
  266.   Siendo el fichero d:\describe\macros\Numeros.cmd el siguiente:
  267.  
  268.   ------------------inicio de numeros.cmd------------------------------
  269.   /* parámetros proporcionados por la macro de DeScribe */
  270.   parse arg Numero, Genero, Idioma
  271.  
  272.   /* Registrar la función, si no lo está */
  273.   if (RxFuncQuery("Number") = 1) then
  274.      call RxFuncAdd "Number", "numbers", "Number"
  275.  
  276.   /* llamar a la función con estos parámetros */
  277.   UnNumero = Number(Numero, Genero, Idioma)
  278.  
  279.   /* devolver el resultado */
  280.   return UnNumero
  281.   -----------------final de numeros.cmd--------------------------------
  282.  
  283.  
  284. Garantías
  285. ───────────────────────────────────────────────────────────────────────
  286.  
  287.   No se garantiza, bajo ningún concepto, que esta función actúa tal y
  288.   como se ha descrito y sin errores.
  289.  
  290.   En NINGUN caso el autor se responsabiliza de posibles problemas,
  291.   pérdidas de información, o cualquier otro inconveniente que el uso de
  292.   esta DLL pueda comportar.
  293.  
  294.  
  295. Condiciones de uso y distribución
  296. ───────────────────────────────────────────────────────────────────────
  297.  
  298.   Esta rutina puede usarse y copiarse en cualquier ordenador.
  299.  
  300.   Esta rutina puede incluirse en otros programas "freeware" y
  301.   "shareware", siempre que se mencione su autor.
  302.  
  303.   No incluya esta rutina en programas comerciales sin permiso escrito
  304.   del autor.
  305.  
  306.  
  307. Herramientas utilizadas
  308. ───────────────────────────────────────────────────────────────────────
  309.  
  310.   La programación se ha realizado con CSet++ First Step, y la
  311.   documentación se ha preparado con QEdit para OS/2.
  312.  
  313.   El objetivo de esta DLL era aprender a construirlas. Para conseguirlo
  314.   he sacado información de la Revista Profesional para Programadores
  315.   (número 4), Dr. Dobb's Journal (septiembre 1994) y de la misma ayuda
  316.   del CSet++ FS.
  317.  
  318.  
  319. El autor
  320. ───────────────────────────────────────────────────────────────────────
  321.  
  322.   Puede contactar con el autor, Gabriel Massip, mediante correo
  323.   electrónico:
  324.  
  325.     Internet:   gmassip@abaforum.es
  326.     Fidonet:    2:343/108.42
  327.  
  328.   Se aceptan sugerencias, nuevas ideas y hasta información sobre
  329.   problemas de funcionamiento!
  330.  
  331.  
  332.  
  333. ╔══════════════════════════════════════════════════════════════════════╗
  334. ║                        English documentation                         ║
  335. ╚══════════════════════════════════════════════════════════════════════╝
  336.  
  337. What does this DLL do?
  338. ───────────────────────────────────────────────────────────────────────
  339.  
  340.   This DLL implements a REXX function (Number) for OS/2 that returns on
  341.   number expressed in cardinals, it est, in letters, in English, Catalan
  342.   or Spanish; for Catalan and Spanish languages the number can be
  343.   obtained in masculine or feminine.
  344.  
  345.  
  346. Included files
  347. ───────────────────────────────────────────────────────────────────────
  348.  
  349.   ejemplo.cmd - Spanish sample
  350.   exemple.cmd - Catalan sample
  351.   file_id.diz - short description
  352.   Numbers.dll - DLL
  353.   numbers.doc - this file
  354.   sample.cmd  - English sample
  355.  
  356.  
  357. Installation
  358. ───────────────────────────────────────────────────────────────────────
  359.  
  360.   You must copy the file NUMBERS.DLL into one directory listed in
  361.   LIBPATH, or include the directory where the DLL resides into this
  362.   CONFIG.SYS sentence.
  363.  
  364.  
  365. Use
  366. ───────────────────────────────────────────────────────────────────────
  367.  
  368.   This is an external function. So it must be registered before being
  369.   used. To do that, call the REXX RxFuncAdd function:
  370.  
  371.     call RxFuncAdd, 'Number', 'numbers', 'Number'
  372.  
  373.   The function NUMBER needs three parameters:
  374.   
  375.   The first one is a number (integer, between  0 and 4,294,967,295).
  376.  
  377.   The second one is a character, that indicates the gender (masculine or
  378.   feminine) in which the cardinal will be obtained:
  379.  
  380.        'm' for masculine
  381.        'f' for feminine
  382.  
  383.   This parameter has no effect when the number is obtained in English,
  384.   but it must be there and must be 'm' or 'f'.
  385.  
  386.   The third one is the language in which the cardinal will be obtained:
  387.  
  388.       'a' for English
  389.       'c' for Catalan
  390.       'e' for Spanish
  391.  
  392.   For example,
  393.  
  394.     say Number(55422, 'f', 'a')
  395.  
  396.   returns
  397.  
  398.     fifty five thousand four hundred twenty two
  399.  
  400.   See the file SAMPLE.CMD to get more information.
  401.  
  402.  
  403. How to use this function from DeScribe
  404. ───────────────────────────────────────────────────────────────────────
  405.  
  406.   This function can be used from any program that allows the use of
  407.   REXX. For example, from DeScribe you can use this macro:
  408.  
  409.   -------------here begins the DeScribe macro--------------------------
  410.   var Number
  411.   var Gender
  412.   var Language
  413.  
  414.   MACRO DeScribeMacro
  415.       SET MacroDialogTitle to "Numbers"
  416.       MSET "Number to convert " TOVALUE Number
  417.       MSET "Gender (M o F) " TOSTRING Gender
  418.       MSET "Language (C, E, A)" TOSTRING Language
  419.       MGET "Enter the number, the gender and the language."
  420.       Set Env0 to Number
  421.       Set Env1 to Gender
  422.       Set Env2 to Language
  423.       Set NumRexxParams to 3
  424.       RunRexxFile "d:\describe\macros\Numbers.cmd"
  425.       Put RexxReturnString
  426.   END MACRO
  427.   -------------here ends the DeScribe macro----------------------------
  428.  
  429.   And the file d:\describe\macros\Numbers.cmd is:
  430.  
  431.   -------------here begins numbers.cmd---------------------------------
  432.   /* parameters supplied by DeScribe's macro */
  433.   parse arg Number, Gender, Language
  434.  
  435.   /* Register the function, if necessary */
  436.   if (RxFuncQuery("Number") = 1) then
  437.      call RxFuncAdd "Number", "numbers", "Number"
  438.  
  439.   /* call the function using the parameters */
  440.   OneNumber = Number(Number, Gender, Language)
  441.  
  442.   /* return the result */
  443.   return OneNumber
  444.   -----------------end of numbers.cmd----------------------------------
  445.  
  446.  
  447. Warranties
  448. ───────────────────────────────────────────────────────────────────────
  449.  
  450.   The author doesn't warrant, in any form, that this function acts as
  451.   described.
  452.  
  453.   In NO case the author is responsible of possible problems, information
  454.   losing, or any other dammages caused directly or indirectly by the use
  455.   of this DLL.
  456.  
  457.  
  458. Usage and distribution
  459. ───────────────────────────────────────────────────────────────────────
  460.  
  461.   This routine can be used and copied in any computer.
  462.  
  463.   You can include this routine in other freeware or shareware programs
  464.   if you indicate its author.
  465.  
  466.   Do not include this routine in commercial programs whithout the
  467.   written permission of the author.
  468.  
  469.  
  470. Tools
  471. ───────────────────────────────────────────────────────────────────────
  472.  
  473.   I've used CSet++ First Step to compile the DLL. The documentation has
  474.   been written using QEdit for OS/2.
  475.  
  476.   I began to build this DLL in order to learn how to write them. I've
  477.   got the necessary information from Revista Profesional para
  478.   Programadores (issue 4), Dr. Dobb's Journal (september 1994) and from
  479.   the CSet++ FS Help.
  480.  
  481.  
  482. The author
  483. ───────────────────────────────────────────────────────────────────────
  484.  
  485.   You can contact the author, Gabriel Massip, via electronic mail:
  486.  
  487.     Internet:   gmassip@abaforum.es
  488.     Fidonet:    2:343/108.42
  489.  
  490.   Suggestions, new ideas and even bug reports are welcome!
  491.