bug0112.pp 488 B

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