10.07.2015 Views

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

Algol 68 - ACM Digital Library

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

202tvan Wijngaarden, et al.ALGOL <strong>68</strong> Revised Report203¢ string ¢(y [J] ](rat char cc):(upb s = 1 I cc := s [1 ] I incomp := true),(ref [ ] char ss):(upb ss - Iwb ss + 1 = upb s ] ss [@ I ] := sI incomp := true),(ref string ss): ss := sI incomp := true)out¢ bits ¢(yD]l¢ (telL bits lb):if L int i; string to Lint (s, radix, i)then lb := bin ielse incomp : = true] incomp := true)esacend,(cpattern choice):begin[ 1 : upb (i of choice) ] sinsert si;staticize insertion (i of choice, si);get insertion (f, si);inl c = c of cpos of f, char kk;int k := O, bool found := false;while k < upb (c of choice) ^ - founddok+:= l;[1 : upb ((c of choice) [k])] sinsert si;bool bool : = true;staticize insertion ((c of choice) [ k ], si);string s;for i to upb sido s plusab(sa of si [i] ] (string ss): ss) x rep of si [i]od;for jj to upb swhile bool : = bool ^ - line ended (f)a - logical file ended (f)do get char (f, kk); bool := kk = s [j~] od;(~ (found := bool) l set char number (f, c))od;it - found then incomp : = trueelsecase type of choice inb)¢ boolean ¢(y [J] l(refbool b): b := k = 1I incomp := true),¢ integral ¢(y [J] I(ref int i): i : = k] incomp := true)esacfi;staticize insertion (i of picture, sinsert)end,(fpatlern fpattern):begin do fpattern (f, fpattern, true);for i to upb sinsert do sinsert [i] := (0, "") od;j-:=lend,(gpattern gpattern):([ 1 : upb (i of gpattern) ] sinsert si;(staticize insertion (i of gpattern, si),staticize insertion (i of picture, sinsert));get insertion (f, si);get (f, y [j])),(void):(j -: = 1; staticize insertion (i of picture, sinsert))esac ;if incompthen set read mood (f);(- (value error mended off) (f) I undefined)fI;get insertion (f, sinsert)odendesac odelse undefinedfl;proc 9 indit string = (ref file f, ref string s, [ ] shame s f, int radix) void :beginbool supp, zs : = true, sign found : = false, space found : = false,no sign : = false, int sp : = 1, rep;prlo ! = 8;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!