Syntax
XXmode=XXprintmode([md])
Input Parameter
md : | | true or false; default is true; |
Output Parameter
Examples
% can be tested only within functns that uses the XX comment concept
XXprintmode on
XXprintmode off
Copyright 2024-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, XXprintmode
, is part of the SG-Library and is used to control the display of comments in the output. It allows users to toggle the visibility of comments in the screen output, which is useful for debugging and understanding the flow of execution.
Input Parameters
- md: This parameter can be either
true
or false
. The default value is true
. It determines whether the comment print mode is on or off.
Output Results
- XXmode: This is a boolean value that reflects the current state of the comment print mode. It will be
true
if the mode is on and false
if it is off.
Algorithm Steps
- The function begins by retrieving the input parameter
md
using the getfuncparams
function. If no parameter is provided, it defaults to 'on'
.
- If
md
is a string and equals 'off'
, it is converted to false
. If it equals 'on'
, it is converted to true
.
- A global variable
SGXXprintmode
is used to store the current state of the print mode.
- If
md
is false
:
- Set
SGXXprintmode
to false
.
- If there are no output arguments, print a message indicating that the comment print mode is "off".
- Set
XXmode
to false
.
- If
md
is true
:
- Set
SGXXprintmode
to true
.
- If there are no output arguments, print a message indicating that the comment print mode is "on" and provide a hyperlink to turn it off.
- Set
XXmode
to true
.
Example Usage
The function can be tested within functions that use the XX comment concept. For example:
XXprintmode on
XXprintmode off
Algorithm explaination created using ChatGPT on 2025-08-19 07:06. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21