Gracias por responder seoane, ya lo consegui. Resulta que declaraba una variable de tipo TStringList, pero se me olvidaba crearla
Creo que te complicas demasiado, casi no entendi nada de tu codigo, yo lo hice mas sencillito:
Código Delphi
[-]
program Phoenix;
{$APPTYPE CONSOLE}
uses
SysUtils, Classes;
var
Comando: string= '';
respuesta: boolean;
Repetir: string='';
Lista: TStringList;
ID: integer;
procedure SearchCommand;
var
i: integer;
begin
for i:=0 to 5 do
begin
Readln(Comando);
if lista.Find(Comando, i)=true then
begin
Exit;
end else
Writeln('Please enter a valid command');
end;
end;
begin
Lista:= Tstringlist.Create;
Lista.Insert(0, 'edit');
Lista.Insert(1, 'quit');
Lista.Insert(2, 'encrypt');
Lista.Insert(3, 'mail');
Lista.Insert(4, 'execute');
Writeln('Welcome to the application in MSDOS Phoenix');
Writeln('Ver.-[26/07/2007] - CopyLeft 2007 by Khronos');
repeat
SearchCommand;
ID:=Lista.IndexOf(comando);
case ID of
0: CommandEdit;
1: exit;
2: CommandEncrypt;
end;
comando:='';
ID:=-1;
until repetir='no';
end.
Salu2