Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Comix 3.0 Reference Manual - <b>cmxmemoblock()</b> get/set memo block size http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
cmxMemoBlock()        Get/set memo block size
------------------------------------------------------------------------------

Synopsis

    cmxMemoBlock( [nNewSize] ) -> nOldSize

Arguments

    nNewSize is optional, and if provided is the size of memo blocks which
    should be used for newly created memo files.  (Must be in the range of
    32 - 16384 or else it will be ignored).

Returns

    cmxMemoBlock() returns the previous default size.

Description

    Space for memo fields in .FPT files is allocated as one or more blocks.
    The size of these blocks is user-configurable.

    By changing the block size, particularly if your memo entries tend to be
    small, you can reduce the amount of space wasted for a memo field value.

    Comix uses a block size of 64 bytes by default.  This default works well
    for most applications.

    NOTE:   This function has no effect on previously created .FPT files.
            It is only used when you create a new database.

    NOTE:   This function has no effect on .DBT files which are always
            allocated in blocks of 512 bytes.

Example

    nPrev := cmxMemoBlock(32)           && Use a really small block size

                                        && Now create the database.
                                        && dummy.fpt will have a block size
                                        && of 32 bytes
    dbCreate("dummy", { { "field1", "C", 20, 0 }, ;
                        { "memo",   "M", 10, 0 } } )

    cmxMemoBlock(nPrev)                 && Restore the previous memo block
                                        && size

See Also

    SET MEMOBLOCK


See Also: SET MEMOBLOCK

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson