⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readex.txt

📁 H++编译器: 一个仿Pascal语言的编译器
💻 TXT
字号:
Program(ReadEx,Dos.MZ);
  Var(Select,Byte);
  Var(Char,Byte);

  Const(Menu1,' [1] upper- to lowercase'+CrLf);
  Const(Menu2,' [2] lower- to uppercase'+CrLf);
  Const(Choice,'What'+Quote.Single+'s your choice...');
  Const(Command,CrLf+CrLf+'Type a key on your keyboard (in proper case): ');
Begin
  Screen.Clear;
  Write('Do you want to convert:'+CrLf+Menu1+Menu2+Choice);
  Select = Read() - $30;
  If Select = 1 Goto UpLow;
  If Select = 2 Goto LowUp;
  Jump(Wrong);

  UpLow:
    Write(Command);
    Char = Read() + $20;
    IfNot Char in ['a'..'z'] Goto NotUpperCase;
    Write(CrLf+Char+' is the lowercase of the character you typed.');
    Jump(Exit);

  LowUp:
    Write(Command);
    Char = Read() - $20;
    IfNot Char in ['A'..'Z'] Goto NotLowerCase;
    Write(CrLf+Char+' is the uppercase of the character you typed.');
    Jump(Exit);

  NotUpperCase:
    Write(CrLf+'The character you typed was not a letter in uppercase!');
    Jump(UpLow);

  NotLowerCase:
    Write(CrLf+'The character you typed was not a letter in lowercase!');
    Jump(LowUp);

  Wrong:
    Write(CrLf+CrLf+'Problems to read? You have to choose 1 or 2!');

  Exit:
    Wait;
End;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -