binary file write functions (Little Endian)


These functions allow to write data to binary files, using the direct Lisp data.
Lisp applications can use these functions to write data to application-specific (binary) data files.

This implies that the logical and physical structure of a "binary file" is known from their documentations.

signed integer 8 bit

signed integer 16 bit

signed integer 32 bit

signed integer 64 bit

unsigned integer 8 bit

unsigned integer 16 bit

unsigned integer 32 bit

unsigned integer 64 bit

float (4 bytes)

double (8 bytes)

string



Remarks

  • the file must have been opened by (open <filename> "wb") : the "wb" mode means "write binary" and is undocumented but supported by AutoLISP as well
  • these functions are already provided by emulation (vle-extension.lsp), but not fully functional under non-BricsCAD systems due to limitations of AutoLISP (work-in-progress), please use with care !
  • using these functions only with BricsCAD is suggested
  • "Little Endian" is the default byte-sequence for x86 + x64 processors, "lowest byte on lowest address";
    "Big Endian" byte-sequence originates from Motorola and other processors (Mac), "highest byte on lowest address



©  Bricsys NV. All rights reserved.