Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## STD
Class emos_std_misc_lib

public class emos_std_misc_lib

# Contains some general-purpose miscellaneous function that do not seem to fit nicely into any other EMOS library.

PUBLIC CONSTANTS:

- ARRSEP

Method Summary
`int` | `debug_msg(in msg)` In debug-mode produces a "report_msg" formated as "DEBUG: `msg`".
`int` | `fail(in rc)` returns !0 if rc != E_OK
`int` | `getLastRc()` what was the last error
`int` | `is_debug()` Returns the debug mode.
`int` | `Ja(in str)` Converts a string "Y"/"Yes" or German equivalent "J"/"Ja" (case-insensitive!) to boolean.
`int` | `load_GUI(in gui)` Wrapper around GUI_load().
`int` | `pass(in rc)` returns !0 if rc == E_OK
`int` | `restore_timeout()` Restores the timeout that has been overriden by the last invocation of the set_timeout() function.
`int` | `set_debug(in mode)` Turns debug mode on/off.
`int` | `set_timeout(in time)` Wrapper around setvar("timeout").
`int` | `yes(in str)` Converts a string "Y"/"Yes" or German equivalent "J"/"Ja" (case-insensitive!) to boolean.

Method Detail

### debug_msg

    public int debug_msg(in msg)

  In debug-mode produces a "report_msg" formated as "DEBUG: `msg`". Otherwise just returns (no message produced).
  Parameters:
    msg - (in) message to be reported in debug mode

### fail

    public int fail(in rc)

  returns !0 if rc != E_OK

### getLastRc

    public int getLastRc()

  what was the last error

### is_debug

    public int is_debug()

  Returns the debug mode.
  Returns: TRUE = debug mode on FALSE = debug mode off

### Ja

    public int Ja(in str)

  Converts a string "Y"/"Yes" or German equivalent "J"/"Ja" (case-insensitive!) to boolean. This function is particularly useful when reading user input (either interactivelly or from data-tables).

  NOTE! Blanks are trimmed from both sides of before comparison.

  Parameters:
    str - (in) string to be evaluated
  Returns: TRUE: string resambles to "y","yes","j" or "ja" FALSE: string resambles to anything else

### load_GUI

    public int load_GUI(in gui)

  Wrapper around GUI_load(). It makes sure that the `gui` is unloaded first before the load is attempted (avoids a message). Additionally it produces a tl_step() message documenting the outcome of invoked GUI_load() function.
  Parameters:
    gui - (in) filename/path of a GUI-map to be loaded
  Returns: E_OK: operation successfull otherwise: see return values for GUI_load()

### pass

    public int pass(in rc)

  returns !0 if rc == E_OK

### restore_timeout

    public int restore_timeout()

  Restores the timeout that has been overriden by the last invocation of the set_timeout() function.

### set_debug

    public int set_debug(in mode)

  Turns debug mode on/off.
  Parameters:
    mode - (in) TRUE = turn debug on, else turn debug off

### set_timeout

    public int set_timeout(in time)

  Wrapper around setvar("timeout"). It saves the current timeout before setting it to the new value.
  Parameters:
    time - (in) timeout (in seconds) to be set

### yes

    public int yes(in str)

  Converts a string "Y"/"Yes" or German equivalent "J"/"Ja" (case-insensitive!) to boolean. This function is particularly useful when reading user input (either interactivelly or from data-tables).

  NOTE! Blanks are trimmed from both sides of before comparison.

  Parameters:
    str - (in) string to be evaluated
  Returns: TRUE: string resambles to "y","yes","j" or "ja" FALSE: string resambles to anything else

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD