pascal kerdes

Fuzesi Arnold arnold.fuzesi.lista at gmail.com
Mon Sep 17 20:12:42 CEST 2007


Jajj, felreertettel.
A sample-hoz semmi közöm, azt csak bemasoltam "tanulsagkepp"....kerdezted 
mit tud az interpreter.
Arra volt valasz kb. jobbhijjan....

Szoval azt szeretnem amit eddig is.
Csak ez a dög ugynezki az előzőleg írt hex tömbödet nem eszi meg. :(

Tehat ez majdnem jo a teljes proginak...de vmiért mégsem "fordul".
Hibaüzenet értelmetlen...

Szamolni kellene a hex tömb helyett a kiirandókat.
Ord ellentéte micsoda?

------
const
 Hex: aray[0..15]of Char = ('0', '1', '2', '3', '4', '5', '6', '7',
 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');

var
 ch:  Char;

begin
while true do begin
  ch := ComReadChr();
  if ch = $4F then
    WriteLn( Hex[Ord(ch) shr 4] + Hex[Ord(ch) and $0F] )
  else
    Write( Hex[Ord(ch) shr 4] + Hex[Ord(ch) and $0F] );
end;
end.

A.
----- Original Message ----- 
From: "Info" <info at kiralyelektronika.hu>
To: "Fuzesi Arnold" <elektro at tesla.hu>
Sent: Monday, September 17, 2007 8:50 PM
Subject: Re: pascal kerdes


Szia !

> sajna azt se tudja megmondani mibaja...
> csak vmit rinyál és kész.
> amugy a bray fele terminal-nak a script része
> ezt pl tudja :), ez a sample:

És Te tudod mit akarsz ? :)
Van valami COM-olvasás-írás és writeln...ezmi ?
Ha a comsendchr() egyenlő a write()-vel akkor:

   while not(i=27) do // wait for ESC char
   begin
     i:=0;
     while i=0 do i:=ComReadChr();
     if not(i=27)then begin
       ii := (i shr 4) + 48;
       i := (i and 15) + 48;
       if (i > 57) then i := i + 8;
       if (ii > 57) then ii := ii + 8;
       comsendchr(ii);
       comsendchr(i);
       if (i = 52) then if (ii = 70) then writeln('');
     end;
   end.

-----------------------------------------
          elektro[-flame|-etc] 



More information about the Elektro mailing list