Jump to content

simbolos,urgente


rdbp

Recommended Posts

Boas,

tu e as tuas dúvidas existenciais.....

faz copy/paste do programa abaixo e corre-o no Pascal

Diz lá se é isso que tu queres?

USES CRT;

VAR CH:CHAR;
    cont,I:INTEGER;

PROCEDURE CARACTERES;
BEGIN
  clrscr;
  cont:=0;
  for I:=1 to 255 do begin
    cont:=cont+1;
    writeln(i,'->',chr(i));
    if cont=23 then begin
      cont:=0;
      readln;
      clrscr;
    end;
  end;
  readln;
end;

procedure codtec;
begin
clrscr;
repeat
  ch:=readkey;
  if ch=#0 then begin
    write('? -> #0 #');
    ch:=readkey;
  end
  else write(ch,' -> #');
  writeln(ord(ch));
until ch=#27;
end;

BEGIN
  WRITELN;
  WRITELN('1 - CARACTERES');
  WRITELN('2 - CODIGO TECLAS');
  REPEAT
    CH:=READKEY;
  UNTIL CH IN ['0'..'2'];
  CASE CH OF
    '1':CARACTERES;
    '2':CODTEC;
    '0':HALT;
  END;
END.
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.