Interactive Parsing

version 3 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next



  • Book 2 - I6 Functions

    Chapter 1 - Utilities

    Section 1 - Turn a byte array into a buffer with length component

    Include (-

    [ CopyBufferWritingLength from_ar to_ar length max_length
        i
        ;
        
        for (i = 0: i < length && i < max_length: i++)
        {
            to_ar -> (i + WORDSIZE) = from_ar -> i;
        }
        to_ar --> 0 = i;
        
    ];

    -).