My application processes very large amounts of data, not from database. I have lots of Records and array of records, and I need to be careful with assigning data type to variables, otherwise I can easily get 'Out of memory' error.
So, I swapped integer with byte or smallint, where possible, string with char.
But I'm curious with how to identify Yes/No, 1/0, True/False.. so the variable that indicates just two states, like boolean, but occupying(consuming) less bytes.
From Delphi help
"A Boolean type is stored as a Byte, a ByteBool is stored as a Byte, a WordBool type is stored as a Word, and a LongBool is stored as a Longint.
So, Boolean is like Byte = 0..255.
Can I create/make my own type with just values 0 and 1 or similar? So that it only takes 1 bit? :)