MS4BIĀ®

MS4BI HELP 2022

by MS4script
01-Introduction
Preface & Copyright
Getting started
Informations + Cmd/param Server
Demos Simple
02- Declarations
Structure
Type
03- Instructions
Conditions if,do,while..
Char/Text functions Char or Text..()
Get + Include functions Get, Include..
String functions String# (hashtag)
Date-Time Day, Time, Year.
Display
Call
Formulas Complex
04- Database
Connector Ado, Odbc, Dsn, SAP, Ms4
DB Connect Create, delete
Import DataSource Import, Consolidation
Administration Admin, User
05- Sql-Query
Sql
Query Form : BTS,Plus
Grid option
06- Charts
Forms Plus, Win, Image, Excel, Morris...
Pie Std, Donut, 3D...
Bar Std, Stack, Line, Area, Plot
Radar
QrCode, Gauge
Step, Stock...
,Google,Leaflet... GeoMap
,Gantt,Timeline,Org.
DrawWindow [web]
07- Dashboard
Form tab, no tab
Responsive UI
08- Report
Report Hierarchy
Report Design
09- Filters
Dialogue + Call
10- Menus
Menu Design
Menu Frameset
Menu Custom
11-UI : Responsive
Tables Responsive,Frame,position
List Group
Text
Panel Header, body, Footer
Button Button, Progress Bar
Icon & Button
Collapse Group, Panel
Notifications
12- Encryption
Encrypt
Decrypt
13- Windows
Dialogue
Picture, Frame, Button..
MsgBox
Grid

Designer

00-OverView
01-Transaction
02-Setting
05-Import
10-Formula
15-Report-Part1
16-Report-Part2
20-Query-Part1
21-Query-Part2
25-Report-Query-Style
30-QrCodeImage
31-Windows
32-Frame
40-TabStrip
50-Collapse
60-BeginForm
63-Input-SubmitBox
70-Input-Select
71-Input-Insert
72-Input-Update
73-Input-Delete
75-Input-Query
77-ListComBo
81-Button-Link
82-Button-DataList
86-Sticky-Label
91-Insert-PhpJsHtml
92-Insert-MS4script
15- Css, html, Php, js.
Insert Native language Begin_sw..End_Sw
16-Install + tools.
Installation & Configuration This Menu
Generate Native... Php, Html, js..
Code Generator Ms4 Script
MarkDown Ms4 Script
Source Code Menu Help This Menu
written with ms4script
      

BASIC HELP : MS4BI by MS4script

2023 version 1.18

Chapter 3 : INSTRUCTIONS + FUNCTIONS STRING

<

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,
#UPPER#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT,#DELETE,#REMOVE,
#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.

>

KEYWORD : STRING #SETVALUE

Definition

function initializes the value of the STRING-type variable. his value can be of type char, text, or string

Syntax

  	 	
	    varStr1#SetValue(literal or string or char or text );
  
	

Example

  
String : varStr1 , varStr2 , varStr3 ;
 TEXT  : VarText1 := "Text ONE..."  ;
 
 ** LITERAL + occur
 varStr1#SetValue("HELLO STRING1");
 varStr2#SetValue("BEGIN STRING " + VarText1 +  "END STRING");
  
  skipLine 1;
 display "step 1 : LITERAL  String . : ",varStr1," LITERAL Occurence String step 2 . :  ",varStr2 ; 
 
 ** STRINGBIG
  varStr1#SetValue(varStr2);
	
	

Remarks

his value can be of type char, text, or string
You can concatenate multiple variables or literals using the '+' separator

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #GETVALUE

Definition

returns the value of the STRING variable. . This value can be of type char, text, or string

Syntax

  	 	
	    varStr1#GetValue() return   (string or char or text );
  
	

Return Values

  returns the value of the STRING variable. This value can be of type string, text, or char. 

Example

  
String : varStr1 , varStr2 , varStr3 ;
 TEXT  : VarText1    ;
 
 #SetValue...
  
  varStr1#GetValue(varStr2)  return VarText1 ;
	** GetValue return string
 varStr1#GetValue()  return varStr3 ;  

	

Remarks

This value can be of type char, text, or string

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #SETAT

Definition

Sets a character at a specified position This value can be of type char, or text

Syntax

  	 	
	    varStr1#SetAt(integer (position), char  )  ;
  
	

Example

  
STRING :   varstr1   ;
 text : varText1 ;
 integer :  i,y;
    
 varStr1#SetValue("hell0 STRINzzz"  );

   
** setAt
     
  varStr1#SetAt(0,"H")   ;
   varStr1#SetAt(12,"G")   ; 
   display "step 2 : varStr1#SetAt(0,'H')   ; position  0hH   <", varStr1,">"; 
          
	

Remarks

position : starting from position zero

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #GETAT

Definition

returns the character value at the specified position starting from position zero. . his value can be of type char, or text

Syntax

  	 	
	    varStr1#GetAt(integer) return   ( char or text );
  
	

Return Values

  Returns the character value at the specified position. This value can be of type string, text, or char. 

Example

  
varStr1#SetValue("HELLO STRING"  );
   
** GetAt
  
  varStr1#GetAt(7) return (varText1) ;
   display "step 2 : GetAt position 7 String .  ", varText1 ; -------->..value  'T'

            
	

Remarks

position : starting from position zero

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #GETLENGTH()

Definition

Returns the length of a given string.

Syntax

  	 	
	    integer := varString#GetLength(); 
  	 or              varString#GetLength() return integer; 

	

Return Values

  The length of the string if successful, or 0 if the string is empty.

 

Example

  	 String :   varStr2   ;

		integer i  :=0 ;
		varStr2#GetLength()  return i ;

         display i;
	
	

Remarks

STRING (automatically manages the memory allocated to store strings.)>>

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #COMPARE

Definition

Compare two strings: Compares the string str1 to the string str2. (The comparison is case-sensitive)

Syntax

  	 	
	    integer := Str#Compare ( string or char or text  ); 
  	
	

Return Values

  Returns an integer value indicating the relationship between the strings:
		return value	indicates
	-	<0	the first character that does not match has a lower value in str1 than in str2
	-	0	the contents of both strings are  equal
	-	>0	the first character that does not match has a greater value in str1 than in str2

 

Example

  
STRING :   varstr1,varStr2   ;
 text : varText1 :="BEGIN STRING";
 
 ** LITERAL + occur
  
 varStr2#SetValue("BEGIN STRING"  );
  
** Compare char ou text
 integer iCompare :=0 ;
 varStr2#Compare(varText1)  return iCompare ;  
   
 skipLine 1;

 display "step 10 COMPARE  char ou text   <",varStr2,"== COMPARE  'BEGIN STRING' ? :<",iCompare,">" ;
 
 if(iCompare = 0)
   then
    Display "1Compare EQUAL !  it s ok  :",iCompare;
	else
	 Display "1NOT not equal  : ",iCompare; 
end_if;

	
	

Remarks

The comparison is case-sensitive

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #COMPARENOCASE

Definition

Compare two strings Performs a case insensitive string comparison.

Syntax

  	 	
	    integer := Str#CompareNoCase ( string or char or text  ); 
  	
	

Return Values

  Returns an integer value indicating the relationship between the strings:
		return value	indicates
	-	<0	the first character that does not match has a lower value in str1 than in str2
	-	0	the contents of both strings are  equal
	-	>0	the first character that does not match has a greater value in str1 than in str2

 

Example

  
STRING :   varstr1,varStr2   ;
text : varText1 :="BEGIN STRING";
 
    
 varStr2#SetValue("BEgiN StriNG"  );
  
** Compare char ou text
 integer iCompare :=0 ;
 varStr2#CompareNoCase(varText1)  return iCompare ;  
   
 skipLine 1;

 display "step 10 COMPARE NP CASE  char ou text   <",varStr2,"== COMPARE  'BEGIN STRING' ? :<",iCompare,">" ;
 
 if(iCompare = 0)
   then
    Display "1Compare EQUAL !  it s ok  :",iCompare;
	else
	 Display "1NOT not equal  : ",iCompare; 
end_if;
 	

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #FORMAT

Definition

Buffer String by format to the standard output . If format includes format specifiers (subsequences beginning with %), the additional arguments following format are formatted and inserted in the resulting string replacing their respective specifiers.

Syntax

  	 	
	    Str#format ( format string);
  	
	

Return Values

  none
    
  

Example

  
STRING  :   varstr1   ;
integer :  i,y;
     
 varStr1#SetValue("HELLOMID$STRING"  );
 
 display "step 1 : LITERAL  String .BEFORE  REPLACE  !", varStr1 ; 
 
     	// EXTRACT to nb char
    text varText1; 
  varStr1#Extract(6,8) return varText1  ; **MID$
  string varstr2;
  varStr1#GetLength() return y;
  varStr2#Format(" It s format : varstr1=%s lg=%i  vartext1=%s" ,varstr1,y,vartext1)   ;  
  
    display "step 3: String FORMAT  #",varstr2 ,""; 
	
 	

Remarks

- The variables are defined using the following convention: %i integer, %l long ,%f float ,%d double , %s string or char or text

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #FIND

Definition

Finds the first occurrence of a string.

Syntax

  	 	
	    varStr#FIND ( string or char or text ) return(integer);
  	
	

Return Values

  Returns the position of the string if successful.
    
  

Example

  	
STRING :   varstr1,varStr2   ;
 text : varText1 :="BEGIN STRING";
    
 varStr2#SetValue("BEGIN STRING"  );
  ** Find char ou text
 integer iFind :=0 ;
 varStr2#Find(varText1)  return iFind ;  
 
 display "step 10 Find  char ou text   <",varStr2,"  == Find  'BEGIN STRING' ? :<",iFind,">" ;
 
 if(iFind = 0)
   then
    Display "1Find position !  it s ok  :",iFind;
	else
	   Display "1NOT not position  : ",iFind; 
	end_if;	
 	

Remarks

If not found: returns 0 as the position . Case-insensitive.

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #REPLACE

Definition

Replaces all occurrences of a string.

Syntax

  	 	
	    Str#Replace(   'search' string, 'replace' string ) ; 
  	
	

Example

  	
STRING :   varstr1   ;
integer :  i,y;
   varStr1#SetValue("HELLO STRING"  );

  skipLine 1;
 display "step 1 : LITERAL  String .BEFORE  REPLACE  <", varStr1,">"; 
 
** REPLACE
     
  varStr1#Replace("HELLO ","")   ;
 
   

Remarks

Case-insensitive

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #UPPER

Definition

Converts a string from lower to upper case.

Syntax

  	 	
	    Str#Upper ();  
  	
	

Example

  	  	
   STRING    :   zStr1  ;  	
    SETVALUE...			
				zStr1#Upper( )  ;
   
   ** output : EXAMPLE : DAVZACUM VITAEDDD CREATE TABLE (INTEGER .
   

Remarks

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #LOWER

Definition

Converts a string from upper to lower case

Syntax

  	 	
	    Str#Lower () ; 
  	
	

Example

  	  	
     STRING    :   zStr1  ;  	
    SETVALUE...			
				zStr1#Lower()  ;
  
   ** output :  example : davzacum vitaeddd create table (integer ..
   

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #EXTRACT

Definition

Extracts a string of characters from position n in the string

Syntax

  	 	
	     varStr#EXTRACT(integer (position) , integer (nb characters) )  return string or char or text  ;   	
	

Example

    
STRING :   varstr1   ;
integer :  i,y;
    
 varStr1#SetValue("HELLOMID$STRING"  );

** EXTRACT to nb char
    text varText1; 
  varStr1#Extract(6,8) return varText1  ; **MID$
 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #DELETE

Definition

Remove a character or characters from a string Based on the position and the number of characters, using the function

Syntax

  	 	
	     varStr#DELETE(integer (position) , integer (nb characters) )   ;   	
	

Example

    
STRING :   varstr1   ;
 text : varText1 ;
 integer :  i,y;
 ** LITERAL + occur
   
 varStr1#SetValue("hell0 STRING"  );
  
** Delete
     
  varStr1#Delete(0,6)   ;
    
   display "step 2 : varStr1   AFTER  Delete  0 to 6   <", varStr1,">"; 
 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #REMOVE

Definition

Removes all substring matches.

Syntax

  	 	
	     varStr#REMOVE(  character )   ;   	
	

Example

    
STRING :   varstr1   ;
 text : varText1 ;
 integer :  i,y;
 ** LITERAL + occur
   
 varStr1#SetValue("hell0 STRING"  );
 
 display "step 1 : LITERAL  String .BEFORE  REMOVE  <", varStr1,">"; 
 
** Remove
     
  varStr1#Remove("h")  ;
     varStr1#Remove("l")  ;

   display "step 2 : varStr1   AFTER  Remove poistion 8  <", varStr1,">"; 

 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #INSERT

Definition

Inserts a string to the specified position.

Syntax

  	 	
	     varStr#INSERT( integer (position) , string or char or text or literal ) )   ;   	
	

Example

    
STRING :   varstr1   ;
 text : varText1 :="$AZERTY$" ;
 integer :  i,y;
 ** LITERAL + occur
   
 varStr1#SetValue("HELLO STRING"  );
  
** Insert
     
  varStr1#Insert(5,varText1)   ;
    
   display "step 2 : varStr1   AFTER  INSERT  5    ", varStr1,""; 

 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #EMPTY

Definition

Forces a string to have 0 length.

Syntax

  	 	
	     varStr#EMPTY()   ;   	
	

Example

    
String :   varStr2   ;
 integer ilg :=0 ;
  
 varStr2#SetValue("BEGIN STRING " + "HELLO STRING1" + "..AGAIN........." + "END STRING");
 varStr2#GetLength()  return ilg;
 
** EMPTY
varStr2#Empty() ;
 varStr2#GetLength()  return ilg;
   skipLine 1;
display "step 3 : Empty() GetLength() String .varStr2 <", ilg,">"; 

 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.



KEYWORD : STRING #TRIMLEFT

Definition

Trim leading white-space characters from the string.

Syntax

  	 	
	     varStr#TRIMLEFT()   ;   	
	

Example

    
 varStr2#SetValue("     BEGIN STRING    "  );
 varStr2#TrimLeft()   ; 
    
 varStr2#TrimRight()   ; 

 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.

KEYWORD : STRING #TRIMRIGHT

Definition

Trim trailing white-space characters from the string.

Syntax

  	 	
	     varStr#TRIMRIGHT()   ;   	
	

Example

    
 varStr2#SetValue("     BEGIN STRING    "  );
 varStr2#TrimLeft()   ; 
    
 varStr2#TrimRight()   ; 
 
 

Remarks

none

See Also

#SETVALUE,#GETVALUE,#SETAT,#GETAT,#GETLENGTH,#COMPARE,#COMPARENOCASE,#UPPER,#LOWER,#FIND,#TRIMLEFT,#TRIMRIGHT #DELETE,#REMOVE,#INSERT,#REMOVE,#REPLACE,#EXTRACT,#FORMAT.

Interested in joining us? contact@mgplanete.com
The Mg Planete team


The official sites :


Copyright 2020 by Mandragore Planete


Our purpose : Keep it simple !


written with ms4script
  • help 01.020.02.2024

MS4BI in 5 minutes

MS4BI Trial Version : Informations :
this message will disappear : Purchase Professional Licence :

https://www.ms4bi.com