desarrollosconsejeria/aulalinex-ltsp-alumno/4.2-2/aulalinexcuestionltsp/global.pas @ 23a384b9
23a384b9 | Elisa | unit global;
|
|
{$mode objfpc}{$H+}
|
|||
interface
|
|||
uses
|
|||
unix,Classes, SysUtils;
|
|||
var
|
|||
g_tiempoempleado:integer;
|
|||
g_usuario,g_dirpersonal:string;
|
|||
g_codigo,g_tipoc:string;
|
|||
g_num_opciones,g_tiempoc:integer;
|
|||
g_pregunta:string;
|
|||
g_opciones:array of string;
|
|||
g_tiempo:integer;
|
|||
g_hostprofe:string='localhost';
|
|||
g_mihost:string;
|
|||
Function HallarDato(Cmd:string):string;
|
|||
implementation
|
|||
function HallarDato(Cmd:string):String;
|
|||
var
|
|||
file1: TextFile;
|
|||
s,t: ansistring;
|
|||
n: longint;
|
|||
j:integer;
|
|||
begin
|
|||
j:=0;
|
|||
n:=popen(file1, Cmd, 'r');
|
|||
if n=-1 then
|
|||
begin
|
|||
result:='';
|
|||
writeln('Error al hallar dato');
|
|||
Exit;
|
|||
end;
|
|||
t:='';
|
|||
while not eof(file1) do begin
|
|||
Readln(File1,s);
|
|||
t:=t+s+Chr(10);
|
|||
inc(j);
|
|||
end;
|
|||
pclose(file1);
|
|||
result := trim(t);
|
|||
end;
|
|||
end.
|
|||