"Fossies" - the Fresh Open Source Software Archive

Member "bc-1.06.95/Test/arrayp.b" (7 Jul 2000, 371 Bytes) of package /linux/misc/old/bc-1.06.95.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Limbo source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 "This tests arrays!
    2 "
    3 define p(a[],x,y) {
    4   auto i;
    5   for (i=x; i<y; i++) a[i];
    6 }
    7 
    8 define m(a[],x,y) {
    9   auto i;
   10   for (i=x; i<y; i++) a[i] = i;
   11 }
   12 
   13 define m1(*a[],x,y) {
   14   auto i;
   15   print "m1\n"
   16   for (i=x; i<y; i++) a[i] = i;
   17 }
   18 
   19 for (i=0; i<10; i++) a[i] = i;
   20 j = p(a[],0,10);
   21 
   22 j = m(b[],0,10);
   23 j = p(b[],0,10);
   24 
   25 print "---\n";
   26 j = m1(b[],0,10);
   27 j = p(b[],0,10);
   28 
   29 quit
   30