[Lazarus-es] Parametros

Lissy Amador 01_lamador en soporteavanzado.com
Jue Dic 23 00:14:13 CET 2010


Perdon por inundar su mail, pero anteriomente preguntaba como podia ingresar parametros
en un programa en pascal, y gracoias por su ayuda, me dijeran las funciones que devia 
usar (paramstr y paramcount)

Pero ahora tengo un problema debo de usar los parametros en un programa ya hecho
este es un ejemplo ,este aberigua la compañia que pertenece,
Se que debo de usar las funciones pero no se como meterlas al codigo
les agradecere su ayuda

PROGRAM TELCONBASE;                                                           ■
║                                                                              ▒
║{************************ DEFINICION DE UNIDADES **************************}  ▒
║USES                                                                          ▒
║  Crt, general, boxes ;                                                       ▒
║                                                                              ▒
║VAR                                                                           ▒
║                                                                              ▒
║   usuario     : str15;        (*Usuario que se usara en el encabezado del pro▒
║   clave       : Str15;        (*clave que se utilizara en el encabezado del p▒
║   Num_Ing     : Integer;      (* Número de input en el que se ingresa *)     ▒
║   Cod         : Str8;         (* Numero telefonico*)                         ▒
║   resp        : char;      (*Respuesta parapoder iniciar seccion*)           ▒
║   Compa       :  String[35];                                                 ▒
║                                                                              ▒
║procedure Inicializa;                                                         ▒
║begin                                                                         ▒
║    Num_Ing  := 1;                                                            ▒
║    Cod      := SPACES(' ',08);                                               ▒
║end;                                                                          ▼
║procedure Despliegue;                                                         ▲
║begin                                                                         ▒
║  escrixy(31,12,Cod,15,blue);                                                 ▒
║end;                                                                          ▒
║                                                                              ▒
║procedure Pregunta_Datos;                                                     ■
║begin                                                                         ▒
║     repeat                                                                   ▒
║           CASE Num_ing OF                                                    ▒
║                1 : LLENA(31,12,'I08',08,Cod);                                ▒
║           end;                                                               ▒
║           Despliegue;                                                        ▒
║           Compa := '';                                                       ▒
║                                                                              ▒
║           if (ENTER) then                                                    ▒
║             begin                                                            ▒
║               CASE Num_ing OF                                                ▒
║                 1 : BEGIN                                                    ▒
║                 SCREEN (1,3);                                                ▒
║                       if TRUNC(VA(Cod,0))  > 0 then                          ▒
║                         begin                                                ▼
  File  Edit  Search  Run  Compile  Debug  Tools  Options  Window  Help
╔═[■]══════════════════════════════ PRT.PAS ═════════════════════════════2═[↕]═╗
║                             if (cod >= '41000000') and (cod <= '42999999') or
║                                (cod >= '47000000') and (cod <= '47419999') or
║                                (cod >= '51100000') and (cod <= '51399999') or
║                                (cod >= '54200000') and (cod <= '54899999') or
║                                (cod >= '56200000') and (cod <= '56399999') or
║                                (cod >= '66200000') and (cod <= '66219999') or
║                                (cod >= '59200000') and (cod <= '59899999') the
║                                  Begin                                       ▒
║                                    Despliegue;                               ▒
║                                    escrixy(31,13, '  Claro    ',yellow, red);
║                                  End                                         ■
║                               else                                           ▒
║                              IF (cod >= '22290000') and (cod <= '22299999') or
║                                 (cod >= '22670000') and (cod <= '22699999') or
║                                 (cod >= '22770000') and (cod <= '22799999') or
║                                 (cod >= '23750000') and (cod <= '23775999') or
║                                 (cod >= '78580000') and (cod <= '78559999') or
║                                 (cod >= '79580000') and (cod <= '79582999') the
║                                  Begin                                       ▒
║                                   Despliegue;                                ▒
║                                   Escrixy(31,13,'ATEL COMMUNICATIONS S.A.',yellow);
║                                 End                                          ▲
║                               else                                           ▒
║                                 Aviso ('El numero no existe..',15,5);        ▒
║                                  end;                                        ▒
║                    PushEnter1(15,5{MORADO});                                 ▒
║                    Screen(0,3);                                              ▒
║                    inicializa;                                               ▒
║                  End;                                                        ▒
║                end;                                                          ▒
║                    END;                                                      ▒
║     Until F10;                                                               ▒
║     Screen(0,1);                                                             ▒
║End;                                                                          ▒
║(************************************************************************)    ▒
║(*             PROCEDIMIENTO   P R I N C I P A L                  *)          ■
║(************************************************************************)    ▒
║Begin                                                                         ▒
║  Begin                                                                       ▒
║  inicializa;                                                                 ▒
║  Pregunta_datos;                                                             ▒
║  end ;     



More information about the Lazarus-es mailing list