Changeset 37426 in project


Ignore:
Timestamp:
03/20/19 00:26:22 (16 months ago)
Author:
Kooda
Message:

Document bitstring for CHICKEN 5

File:
1 copied

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/bitstring

    r37423 r37426  
    181181;
    182182
    183 (use bitstring)
     183(import bitstring)
    184184
    185185; The following will print "integer:3721182122",
     
    199199;
    200200
    201 (use bitstring)
     201(import bitstring)
    202202
    203203; This will print "StringData:(65 66 67 68 69)"
     
    211211      (print "invalid string")))
    212212
    213 ; Example 3. IP packet parsing. 
     213; Example 3. IP packet parsing.
    214214;
    215215
     
    234234                            (= Protocol 2)
    235235                            (= Protocol 6)
    236                             (= Protocol 17))) 
     236                            (= Protocol 17)))
    237237    (CheckSum 16)
    238238    (SourceAddr 32 bitstring)
     
    250250             "\n Protocol: " Protocol
    251251             "\n CheckSum: " CheckSum
    252              "\n SourceAddr: " 
     252             "\n SourceAddr: "
    253253                 (bitmatch SourceAddr (((A)(B)(C)(D)) (list A B C D)))
    254                "\n DestinationAddr: " 
     254               "\n DestinationAddr: "
    255255                   (bitmatch DestinationAddr (((A)(B)(C)(D)) (list A B C D)))))
    256256  (else
    257257    (print "bad datagram")))
     258
    258259
    259260; Example 3.1 Using bitconstruct.
     
    290291;
    291292; WARNING!!! bitpacket feature is experimental !!!
    292 (use bitstring posix srfi-4)
     293(import bitstring srfi-4 (chicken file posix))
    293294
    294295(bitpacket TGA-Header
     
    387388== Version History
    388389
     3901.35
     391Port to CHICKEN 5
     392
    3893931.34
    390394Fix boolean parsing to support terms following boolean terms. (Jonathan Chan)
Note: See TracChangeset for help on using the changeset viewer.