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 : INSTRUCTION + FUNCTION

KEYWORD : STR_LEN

Definition

Returns the length of a given string.

Syntax

  	 	
	    integer := Str_len ( char or text ); 
  	
	

Return Values

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

 

Example

  	 char    : $str:50 ;
         integer : i;
		
		$str := "abcdef";
              i := Str_len($str); // i= 6 
         display i;
	
	

Remarks

a := b := Assigns the value of b as a new value for a.

See Also

Str_str ..



KEYWORD : STR_COMPARE

Definition

Compare two strings Compares the string str1 to the string str2.

Syntax

  	 	
	    integer := Str_Compare ( char or text str1, char or text str2); 
  	
	

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

  	  text :   varText1,varText2  ;
		 varText1 :=  "HELLO TEXT" ;  varText2 := "ZZZZ2";
         integer iFind  ;
		iFind := Str_Compare(varText1,varText2) ;   
  
            display "step 12  Str_Compare  <",varText1,">== Find  :",varText2," ? <",iFind,">" ;
		if(iFind =  0)
		then
			Display "Compare OK  :",iFind;        
			else
			Display "NOT COMPARE: ",iFind;  <---------------Result
		end_if;
	
	

Remarks

a := b := Assigns the value of b as a new value for a.

See Also

Str_str ..



KEYWORD : STR_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 ( string buffer, format string);
  	
	

Return Values

  none
    
  

Example

  
INTEGER : Exit_TRANS1 ,Ival := 22544 ;
FLOAT : Fval Dec(2) := 1123456789.00;
LONG : Lval := 2147483645;
DOUBLE : Dval Dec(2) := 1234567890123.12 ;
Text : nTextFormat, ntextEx:="Example Format";
 
Clear nTextFormat;
Str_Format(nTextFormat, "This is a <%s> : integer <%i>, float <%f> , double <%d>  , long <%l>",
ntextEx,Ival,Fval,Dval,Lval)	;
Display "nTextFormat : ",nTextFormat Column 40;


** output : nTextFormat : This is a  : integer <22544>, float <1123456768.00> , double <1234567890123.12>  , long <2147483645>...
	
 	

Remarks

- The variables are defined using the following convention: %i integer, %l long ,%f float ,%d double , %s char or text - Goto to see : Num_Str, Str_num, format



KEYWORD : Str_STR

Definition

Finds the first occurrence of a string.

Syntax

  	 	
	    Str_str ( char or text ) return(integer,string);
  	
	

Return Values

  Returns the position of the string and returns the portion of the string if successful.
    
  

Example

  	 text    :  zStrStr, zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
     	 integer :  X  ;
		  
 		 display" Found string :CREATE TABLE -->   ";
	  		   Str_str(zSchema, "CREATE TABLE"  ) return (x, zstrstr);
			if(x > 0) then
			 display " position : ",x  , " Schema : ",zStrstr; 
			end_if ;
	
	** output : 	 return position 29, string ;CREATE TABLE (integer .....
	
 	

Remarks

If not found: returns 0 as the position and voids the value of the string . Case-insensitive.



KEYWORD : STR_REPLACEALL

Definition

Replaces all occurrences of a string.

Syntax

  	 	
	    Str_ReplaceAll ( string , 'search' string, 'replace' string ) ; 
  	
	

Example

  	text : LCurrentDir   := "H:\MandragorePlanete\MS4BI\zDemo-Simple\ExampleString"   ;
 
			**REPLACE ALL STRING : \ by /  
 
 		     Str_ReplaceAll(LcurrentDir ,"\","/");
  
 ** output : H:/database1.db/MS4BI/zDemo-Simple/ExampleString
 	

Remarks

Case-insensitive

See Also

Str_len , Str_str ..



KEYWORD : STR_UPPER

Definition

Converts a string from lower to upper case.

Syntax

  	 	
	    Str_Upper ( string);  
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
    			
				STR_Upper(zSchema )  ;
   
   ** output : EXAMPLE : DAVZACUM VITAEDDD CREATE TABLE (INTEGER .
   

Remarks

See Also

Str_len , Str_str ..



KEYWORD : Str_LOWER

Definition

Converts a string from upper to lower case

Syntax

  	 	
	    Str_Lower ( string) ; 
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
  	  			
				Str_Lower(zSchema )  ;
  
   ** output :  example : davzacum vitaeddd create table (integer ..
   

Remarks

See Also

Str_len , Str_str ..



KEYWORD : STR_ISNUMERIC

Definition

Tests if the string is numeric

Syntax

  	 	
	    integer := Str_isNumeric( string) ; 
  	
	

Example

  	  	
	text    : zSchema1 := " example : davzacum vitaeddd", zSchema2 :="123456.12" ;  	
	integer : x ;
	double  : dval Dec(2);
		 display"1- is numeric ? : ", zSchema1 ;
	  			x := Str_isNumeric(zSchema1);
	 			if(x = 0)  
				then
		 		display " Schema is not numeric ",zSchema1; 
				else
				display " Schema is numeric ",zSchema1; 
				end_if ;
   ** output : Schema is not numeric example : davzac..
   

Remarks

If not numeric, returns 0, otherwise returns 1

See Also

Num_Str, Str_num



KEYWORD : STR_Cat

Definition

Concatenates strings.

Syntax

  	 	
	    Str_Cat   string or literal,string or literal... into string_output ; 
  	
	

Example

  	 
   text : zSchema1 := "example : davzacum vitaeddd", zSchema2 :="CREATE TABLE (integer ..";
   text : outputTEXT;  	
   				Str_Cat  zSchema1, "-NEXT--->",zSchema2,"///[end]" into outputTEXT  ;
		 		display "Str_Cat Schema1, ..2 ... : ",outputTEXT; 


  ** output : example : davzacum vitaeddd-NEXT->CREATE TABLE (integer ..///[end] 

   

Remarks

Not used with float or integer or long or double data types, use Num_Str to convert these to a string.

See Also

Num_Str ..



KEYWORD : STR_REVERSE

Definition

Reverses a string.

Syntax

  	 	
	    Str_reverse ( string)  ;
  	
	

Example

  	  	
   text    :   zSchema := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
   			
			Str_reverse(zSchema )  ;
				 		  
	   
   ** output : regetni( ELBAT ETAERC dddeativ mucazvad : elpmaxe
   

Remarks

See Also

Str_len , Str_str ..



KEYWORD : Str_SORT

Definition

Sorts strings.

Syntax

  	 	
	    Str_sort( string)  ;
  	
	

Example

  	  	
   text    :   zSchema1 := " example : davzacum vitaeddd CREATE TABLE (integer .....";  	
  	 display" sort : example : davzacum vitaeddd CREATE TABLE (integer .....' ";
	   			Str_sort(zSchema )  ;
		 		display "sort Schema : ",zSchema; 

   ** output : (.....:AABCEEELRTTaaaacddddeeeeegiilmmnprttuvvxz
   

Remarks

Sorts in ascending order

See Also

Str_len , Str_str ..



KEYWORD : Str_num

Definition

Converts strings to numeric data types.

Syntax

  	 
  	    STR_num   string  to Numeric  ;  
  	
	

Example

  	  	long : Lval;
            text : Wordnumeric := "12345";
			
          Str_num   Wordnumeric to Lval ;
		  

Remarks

Str_IsNumeric() . Numeric can be float or long or integer or double data type

See Also

Str_isnumeric, Str_len , Str_str ..



KEYWORD : Num_Str

Definition

Converts numeric values to character strings.

Syntax

  	 	
	   Num_Str   Numeric   to string format string ;  
  	
	

Example

  	  	float : fval dec(2) :=  12345,85 ;
            text : Wordnumeric  ;
		
          Num_Str  Fval to Wordnumeric Format "05.2";
		  

Remarks

Str_IsNumeric() . Numeric is float or long or integer or double data type.
Format is optional

See Also

Str_num ..



KEYWORD : STR_EXTRACT

Definition

Extracts a string of characters from position n in the chain

Syntax

  	 	
	    string := Str_EXTRACT(string: position , nb character ) ;   
		or
  	    string :=  string: position , nb character   ;   
		
	

Example

  
   TEXT : Word1  := "EU" +"RE"+ "KA" ,CharExtract ;
  
Display "   Word1  : " , Word1 ;
CharExtract := Str_EXTRACT(word1:3,4) ; 

Display "1   extract    word1 :--> ",word1," CharExtract: 3  posit / 4charact : ",CharExtract;

CharExtract :=  word1:2,5;

Display "2   extract    word1 :--> ",word1," CharExtract: 2  posit / 5charact : ",CharExtract;

** output 1 : REKA
** output 2 : UREKA
		  

Remarks

-do not use float or long or integer or double data types.
-position , nb charact : integer possible.

See Also

Str_num ..

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