B4A.BASE.JOBI.CONFIG-ADD

Summary

Object type
JOBI
Object Folder
PACKAGES/BEST4AUTOMIC/B4A.BASE/SOURCE/CONFIGURATION
Title
Add entry to module configuration VARA
Archive Key 1
-
Archive Key 2
-
Created
WRITER/B4A am: 2022-03-24 08:01:42
Last Modified
WRITER/B4A am: 2024-01-09 10:09:58 14 x
Last Used
-

Description

Adds a configuration entry to the configuration file

Parameter

$ENRTY$
description of the parameter

Input

Output

Example

    :include B4A.BASE.JOBI.CONFIG_ADD $ENRTY$ = "option=value"

Process

:set &item# = "$ENTRY$"
:switch &$PLATFORM#
:  case "UNIX"
:set &item# = resolve_var( &item# )
! create a string like this '"'"'
:set &quoted# = "'"
:set &quoted# = str_cat( &quoted#, '"' )
:set &quoted# = str_cat( &quoted#, "'" )
:set &quoted# = str_cat( &quoted#, '"' )
:set &quoted# = str_cat( &quoted#, "'" )
:set &item# = str_sub( &item#, "'", &quoted# )
echo '&item#' >> $b4a_config_file
:  case "WINDOWS"
:  inc BBC.SHARED.JOBI.ESCAPE4POWERSHELL $STRING$ = "&item#"
"&BBCS_ESCAPED_STRING_O#" | Add-Content $b4a_config_file.fullName
:endswitch