Gentee Programming Language > Documentation > Libraries | Download documentation |
It is possible to use variables of the buf type for working with memory. This type can be defined in the language as binary data.
Operations defined for the variable of buf type are listed below. The second column contains possible statements where typename is a variable or an expression of the specified type.
Operation Syntax Return type Comments Variable description - allocate a memory block of i bytes during initialization and initiate it with zeros. [] byte Getting byte i from the buffer. * uint Get the size of the memory being used. = buf Copying data from one buffer into another. += buf Adding data to the buffer. + buf Putting two buffers together and creating a resulting buffer. == uint Comparison operations. != uint - < uint - > uint - <= uint - >= uint -
buf.alloc | Memory allocation |
buf.append | Data addition |
buf.clear | Clearing data |
buf.copy | Copying |
buf.crc | Calculating the checksum |
buf.del | Data deletion |
buf.expand | Expansion |
buf.free | Memory deallocation |
buf.getmultistr | Getting data from a string array |
buf.insert | Data insertion |
buf.read | Reading from a file |
buf.replace | Overwriting data |
buf.setmultistr | Writing data into a string array |
buf.write | Writing to a file |
buf.writeappend | Appending data to a file |
Initializing the search pattern | Creating data search pattern |
Data search | Searching through the buffer for the specified data |
![]() |
![]() Copyright © 2004-2006 Gentee Inc. All rights reserved. ![]() |