tb0094.pp 566 B

123456789101112131415161718192021222324
  1. { Old file: tbs0112.pp }
  2. { still generates an internal error 10 OK 0.99.1 (FK) }
  3. type
  4. TextBuf=array[0..127] of char;
  5. TextRec=record
  6. BufPtr : ^textbuf;
  7. BufPos : word;
  8. end;
  9. Function ReadNumeric(var f:TextRec;var s:string;base:longint):Boolean;
  10. {
  11. Read Numeric Input, if buffer is empty then return True
  12. }
  13. begin
  14. while ((base>=10) and (f.BufPtr^[f.BufPos] in ['0'..'9'])) or
  15. ((base=16) and (f.BufPtr^[f.BufPos] in ['A'..'F'])) or
  16. ((base=2) and (f.BufPtr^[f.BufPos] in ['0'..'1'])) do
  17. Begin
  18. End;
  19. end;
  20. begin
  21. end.