home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
numbr11.zip
/
numbers.doc
< prev
next >
Wrap
Text File
|
1996-05-19
|
15KB
|
491 lines
A partir de la línea 169 hay una explicación en español.
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 número expressat en
lletres) en català, espanyol o anglès; pel català i espanyol el número
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 anglès
Instal·lació
───────────────────────────────────────────────────────────────────────
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
paràmetre 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 paràmetres:
El primer és un número (enter, comprès entre 0 i 4.294.967.295).
El segon és un caràcter, que indica el gènere en què s'ha de donar el
cardinal:
'm' per masculí
'f' per femení
Aquest paràmetre no té cap efecte en pel número en anglès, 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 anglès
Per exemple,
say Number(55422, 'f', 'c')
dóna
cinquanta-cinc mil quatre-centes vint-i-dues
Vegeu el fitxer EXEMPLE.CMD per a més 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 següent
macro:
-------------inici de la macro per a DeScribe------------------------
var Numero
var Genere
var Idioma
MACRO DeScribeMacro
SET MacroDialogTitle to "Números"
MSET "Número a convertir " TOVALUE Numero
MSET "Gènere (M o F) " TOSTRING Genere
MSET "Idioma (C, E, A)" TOSTRING Idioma
MGET "Entreu el número, el gènere 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 següent:
------------------inici de nombres.cmd-------------------------------
/* paràmetres 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 paràmetres */
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, pèrdues
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 permís
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 (número 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
electrònic:
Internet: gmassip@abaforum.es
Fidonet: 2:343/108.42
S'accepten suggeriments, noves idees i, fins i tot, informació
sobre problemes de funcionament!
╔══════════════════════════════════════════════════════════════════════╗
║ Documentación en español ║
╚══════════════════════════════════════════════════════════════════════╝
¿Para qué sirve esta DLL?
───────────────────────────────────────────────────────────────────────
Esta DLL proporciona una función REXX (Number) para OS/2 que devuelve
el cardinal de una cantidad (es decir, un número expresado en letras),
en español, catalán o inglés; para el español y catalán el número se
puede obtener en masculino o femenino.
Ficheros incluídos
───────────────────────────────────────────────────────────────────────
ejemplo.cmd - ejemplo de uso en español
exemple.cmd - ejemplo de uso en catalán
file_id.diz - descripción breve
Numbers.dll - DLL
numbers.doc - este fichero
sample.cmd - ejemplo de uso en inglés
Instalación
───────────────────────────────────────────────────────────────────────
Copie el fichero NUMBERS.DLL en uno de los directorios incluídos en
LIBPATH, o bien incluya el directorio donde reside la DLL en esta
sentencia del CONFIG.SYS.
Uso
───────────────────────────────────────────────────────────────────────
Al tratarse de una función externa primero hay que registrarla. Para
eso, llame la función RxFuncAdd de REXX:
call RxFuncAdd, 'Number', 'Numbers', 'Number'
La función NUMBER se llama con tres parámetros:
El primero es un número (entero, comprendido entre 0 y 4.294.967.295).
El segundo es un carácter, que indica el género en que se quiere
obtener el cardinal:
'm' para masculino
'f' para femenino
Este parámetro no tiene ningún efecto para los números en inglés, 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 español
'c' para catalán
'a' para inglés
Por ejemplo,
say Number(55422, 'f', 'e')
da
cincuenta y cinco mil cuatrocientas veintidos
Para obtener más información, vea el fichero EJEMPLO.CMD.
Como usar la función desde DeScribe
───────────────────────────────────────────────────────────────────────
Esta función 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 "Números"
MSET "Número a convertir " TOVALUE Numero
MSET "Género (M o F) " TOSTRING Genero
MSET "Idioma (C, E, A)" TOSTRING Idioma
MGET "Entre el número, el género 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------------------------------
/* parámetros proporcionados por la macro de DeScribe */
parse arg Numero, Genero, Idioma
/* Registrar la función, si no lo está */
if (RxFuncQuery("Number") = 1) then
call RxFuncAdd "Number", "numbers", "Number"
/* llamar a la función con estos parámetros */
UnNumero = Number(Numero, Genero, Idioma)
/* devolver el resultado */
return UnNumero
-----------------final de numeros.cmd--------------------------------
Garantías
───────────────────────────────────────────────────────────────────────
No se garantiza, bajo ningún concepto, que esta función actúa tal y
como se ha descrito y sin errores.
En NINGUN caso el autor se responsabiliza de posibles problemas,
pérdidas de información, o cualquier otro inconveniente que el uso de
esta DLL pueda comportar.
Condiciones de uso y distribución
───────────────────────────────────────────────────────────────────────
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 programación se ha realizado con CSet++ First Step, y la
documentación se ha preparado con QEdit para OS/2.
El objetivo de esta DLL era aprender a construirlas. Para conseguirlo
he sacado información de la Revista Profesional para Programadores
(número 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
electrónico:
Internet: gmassip@abaforum.es
Fidonet: 2:343/108.42
Se aceptan sugerencias, nuevas ideas y hasta información 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!