Ver Mensaje Individual
  #8  
Antiguo 21-07-2010
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
Aqui el asunto esta en cambiar Length por algo que funcione ya que esto lo que hace es indicar la cantidad de elementos del array y compararlo con el dato que esta en el edit.
Es lo que se me ocurre de momento ya que no manejo bien los array.
Código Delphi [-]

  TPosicion = array[1..8] of integer;

const
  Posicion_dada: TPosicion = (1,7,3,4,8,6,2,5);

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  total, Numero :Integer;
begin
  Numero:= StrToInt(Edit1.Text);
  total := Length(Posicion_dada);
  if (Numero = total) then begin
  ShowMessage(IntToStr(Posicion_dada[total]));
  end
  else
  ShowMessage('No esta en esa posicion');
end;
Ya vendra algun maestro y ayudara.
Saludos
__________________
Siempre Novato

Última edición por Caral fecha: 21-07-2010 a las 04:38:52.
Responder Con Cita