API Console.AddMemory

From Flowcode Help
Jump to navigationJump to search
Fc9-comp-macro.png AddMemory
Adds a window to the list of consoles available 
Fc9-string-icon.png - STRING Name
The name to appear as the consoles title 
Fc9-u32-icon.png - ULONG Bytes
The number of bytes to add to the buffer 
Fc9-u32-icon.png - ULONG BpL
The number of bytes per line to display 
Fc9-u8-icon.png - BYTE Init
The value to initialise each byte of memory to 
Fc9-bool-icon.png - BOOL UserWrite
Set true to allow amending of the data from the User 
Fc9-h32-icon.png - HANDLE Return


Detailed description

A memory console is a block of text suitable for use as a memory display, for example to display the contents of a disk or EEPROM. When text is added, this will always overwrite the existing memory so the text contents will remain the same size. This differs from the AddText call which has an unlimited size and operates in 'append' mode to add to the text.


Once a handle is created it must be retained, as Flowcode will remove any handles from the system that are not referenced.


The style and content of the console can be changed at any time. The only thing that is fixed is the type of console - a memory console always has a fixed size and a fixed number of characters per line.


Examples

Calling in a calculation

  • Declare a variable 'result' of type HANDLE
  • Add to a calculation icon:
    result = ::Console.AddMemory("name", bytes, bpl, init, false)

Flowchart example

The example FC6 Icon.png SIMAPI Console illustrates basic creation of a console window.