Difference between revisions of "API Console.AddMemory"

From Flowcode Help
Jump to navigationJump to search
(XML import API changes)
Line 35: Line 35:
  
 
==Detailed description==
 
==Detailed description==
''<span style="color:red;">No additional information</span>''
+
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 [[API Console.AddText|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.
  
  
Line 43: Line 47:
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Console.AddMemory("name", bytes, bpl, init, false)</pre>
 
* Add to a calculation icon: <pre class="brush:[cpp]">result = ::Console.AddMemory("name", bytes, bpl, init, false)</pre>
  
''<span style="color:red;">No additional information</span>''
+
===Flowchart example===
 +
The example [[file:SIMAPI Console.fcf]] illustrates basic creation of a console window.

Revision as of 09:36, 5 June 2013

<sidebar>API contents</sidebar> Adds a window to the list of consoles available

Class hierarchy

Console

AddMemory

Parameters

STRING Name

The name to appear as the consoles title

ULONG Bytes

The number of bytes to add to the buffer

ULONG BpL

The number of bytes per line to display
The default value for this parameter is: 16

BYTE Init

The value to initialise each byte of memory to
The default value for this parameter is: 0

BOOL UserWrite

Set true to allow amending of the data from the User


Return value

HANDLE

No additional information


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.


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 File:SIMAPI Console.fcf illustrates basic creation of a console window.