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..
String functions Str..()
Get + Include functions Get, Include..
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

2022 version 1.10

Chapter 2 : DECLARATION TYPES

KEYWORD : SCALAR

Definition

    Scalar types:
  • INTEGER
  • LONG
  • FLOAT (number with floating decimal)
  • DOUBLE (number with floating decimal)
  • CHAR (number of characters)
  • TEXT (number of characters, max 255)
  • CONSTANT_STRING (CONSTANT string : number of characters, max 255)
  • CONSTANT_NUM (CONSTANT numeric : type long)
  • DEFINE (DEFINE = CONSTANT numeric : type long)

Syntax

  
		INTEGER : VarName ;(optional-assignment  := XXXXX) 
		LONG 	: VarName ;(optional-assignment  := XXXXX) 
		FLOAT 	: VarName DEC (X) ; (number of decimals) (optional-assignment  := XXXXX or XXXX.XX)
		DOUBLE 	: VarName DEC (X) ;(number of decimals) (optional-assignment  := XXXXXX or XXXXX.XXXXX)

		CHAR 	: VarName :XXX  ;(number of characters) (optional-assignment  := "zzzzzzz")
		TEXT	: VarName  (optional-assignment , max 255 := "zzzzzz")
		CONSTANT_STRING :   VarName "literal max 255" ;
		CONSTANT_NUM :   VarName value ;
		DEFINE       :   VarName value ;
		
	

Example

  

INTEGER :  X ,I ;
LONG    : Wnt ;
FLOAT   : Y Dec(2),X1 Dec(3):=123.857;
DOUBLE  : Dval Dec(5) := 1234567890123.12345;
CHAR    : Zone1:150 :="MgPlanete " ;
TEXT    : LabelMsg:= "   Simple Calculation .......";

CONSTANT_STRING :  $Bts_btn_default "  type='button' class='btn btn-default ";
CONSTANT_NUM    :  cVal1 20, cVal2  99;

define WS_OVERLAPPED       0x00000000
define WS_POPUP            0x80000000
define WS_CHILD            0x40000000
define WS_MINIMIZE         0x20000000      
 
	

Pre-requisites

Remarks

. Declarations for ALPHANUMERIC scalar: 40 characters max. Cannot contain the following Custom characters : * + - / ? __ [ ] ( ) { } & | ; , \ " => <= != := : > < = Example : TEXT : LABELMSG;
Example of acceptable or unacceptable FLOAT or DOUBLE values
a = 1.234; OK
b = 1.2e3; NOT OK
c = 7E-10; NOT OK
min/max values :
integer -32 768 to 32 767
long -2 147 483 648 to 2 147 483 647
float 3.4E +/- 38 (7 figures)
double 1.7E +/- 308 (15 figures)
char 0 to 255
For num or string or Define constants: values cannot be changed after declaration.



KEYWORD : STRUCT

Definition

Data structure

Syntax

  
 	STRUCT : NameStruct { scalar, table , struct..};
	 
	 

Example

  
	STRUCT : Week {INTEGER MgPlanete,Tuesday, Sunday;}
	STRUCT : ST_INFO 
			{
			
			LONG Postcode  ; 
	  		CHAR Town:40  ;
			INTEGER zint  ;
			CHAR Reference:80  ;
			TEXT LabelTxt;
			FLOAT Ca Dec(2) ;
			DOUBLE Catotal Dec(6) ;
			FLOAT Array : BusinessValue dec(2) Occurs 20 ;
			STRUCT:Week;
	  		};
 
  ST_INFO Year2017 ; ** duplicate st_info
  integer i:=2;
 
  ST_INFO.town := "London";
  Year2017.town := "New York";
  Week.MgPlanete := 24; 
  ST_INFO.Week.MgPlanete  := 155;
  ST_INFO.ca := 12345.99;
    ST_INFO.BusinessValue[12] := 8888888.99; 
   

Pre-requisites

SCALAR AND/OR TABLE AND/OR STRUCT

Remark

None



KEYWORD : ARRAY

Definition

Simple array with 1 dimension and n occurrences

Syntax

  
 	
	ARRAY : ArrayName OCCURS XXXX { scalar } ;   struct   
	CHAR     :  ArrayName OCCURS XXXX;
	INTEGER  :  ArrayName OCCURS XXXX;
	LONG     :  ArrayName OCCURS XXXX;
	FLOAT    :  ArrayName OCCURS XXXX;
	DOUBLE   :  ArrayName OCCURS XXXX;
	
	 

Example 1

  
  Array : Department OCCURS 10 { INTEGER Number ; CHAR Name :25 ; } ;
  
  BEGIN
   integer i :=2 ;
   Department[i].Number:= 99 ;
	 
    Display " Department[2].Number :", Department[2].Number;
  END ;
   

Example 2

 	
CHAR    : Array : tableSAP :40 Occurs 10,     cVar:40 ;
INTEGER : Array : Number0 Occurs 10 ;
LONG    : Array : NumberL0 Occurs 10 ;
FLOAT   : Array : MontantF Dec(2) Occurs 30;
DOUBLE  : Array : MontantD Dec(4) Occurs 30;
integer  x1:=25:	

 tablesap[1] := "PRPSS"; tablesap[2] := "PROJS";
 Number0[4]  := 99;
 NumberL0[6] := 199999;
 MontantF[x1] := 2000.02;
 MontantD[18] := 910002000.01234;
 cVar := "toto";
 Display " ";
 SetColorText (Hwdisplay:Blue,Red) ;
 		
	Display "------------------------------------------------------------------------- " ;
	Display "     ARRAY --------------------->SIMPLE! ....          " ;
	Display "------------------------------------------------------------------------- " ;
 
	SetColorText(Hwdisplay:green,black) ;
 display "CHAR: table 1  :" ,tablesap[1],"    table 2 :",tablesap[2],"     CVar :",cvar;
  skipline 2;
 display  "INTEGER: Number0[4] :" , Number0[4];
  skipline 2;
 display "LONG: NumberL0[6] :" , NumberL0[6];
  skipline 2;
 display "FLOAT: MontantF[25] :" , MontantF[x1];
  skipline 2;
 display "DOUBLE: MontantD[18] :" , MontantD[18];  
  

Pre-requisites

none

Remarks

NUMBER OF OCCURRENCES <999999 Advice: Create a temporary table: MS4_SQL{ ..} "CREATE VIEW TEMP name..." + SELECT..



KEYWORD : TABLEBTREE

Definition

Simple Btree Memory array with 1 dimension and n data values

Syntax

  
 	
	 TABLEBTREE : nameTabletree
		{ "constants".. };
	
	 

Example

  
		Tablebtree : Toto
		{"Z" , " A", "B", "C", "EEF", " tuesday" ,"12", "20000" } ;

	

Pre-requisites

none

Remarks

NUMBER OF CONSTANTS : no constraints

See also

TABLEBTREE_UPDATE, TABLEBTREE_INSERT, TABLEBTREE_DELETE,TABLEBTREE_DELETEALL,TABLEBTREE_DELETEALL,TABLEBTREE_LOOKUP,TABLEBTREE_GETSIZE,TABLEBTREE_TRACE






KEYWORD : TABLEBTREE_UPDATE, TABLEBTREE_INSERT,TABLEBTREE_LOOKUP,
TABLEBTREE_GETSIZE, TABLEBTREE_DELETE,TABLEBTREE_DELETEALL

Definition

Simple Btree Memory array with 1 dimension and n data values : UPDATE, INSERT + LOOKUP, DELETE, DELETEALL

Syntax

  
 	
	 	 TABLEBTREE_UPDATE(nameBtree, old value in btree, new value) (optional) return (0 or 1) (integer) ; 
		 TABLEBTREE_INSERT(nameBtree,   new value);
		 TABLEBTREE_LOOKUP(nameBtree,   new value) (optional)  return (0 or 1) (integer) ; 
		 TABLEBTREE_GETSIZE(nameBtree) return value(integer) return (0 or 1) (integer)
		 TABLEBTREE_DELETE(nameBtree,    value)(optional)  return (0 or 1) (integer) ; 
		 TABLEBTREE_DELETEALL(nameBtree)(optional)  return (0 or 1) (integer); 
	
	 

Example

  
INTEGER :   X ;
Tablebtree : Toto
		{"Z" , " A", "B", "C", "EEF", " tuesday" ,"12", "20000" } ;
 	
	 Tablebtree_Update(Toto,"12","999") Return(X); /* change 12 by 999 !!! */
 	IF (X Not_Void) 
	THEN Display " Update it's OKKKKKKKKKKKKKK........12, and 999 :  ",X ;
	ELSE Display " Update it's NOT  OK ........ 12 :   " ,X ;
	END_If ;
	
	Tablebtree_Insert(Toto,"MGPLANETE");
	Tablebtree_Lookup(Toto,"MGPLANETE") Return  (X);
	IF (X Not_Void) 
	THEN Display "  Found :  MGPLANETE"  ;
	ELSE Display " NOT Found :MGPLANETE ";
	END_If ;
	Tablebtree_Getsize(toto) return(x);
    Display "Getsize TableBtree(toto) : ",x;
	
	Tablebtree_Delete(Toto,"EEF") Return(X); /* returning Not obligatoire */
 	IF (X Not_Void) 
	THEN Display " Delete it's OKKKKKKKKKKKKKK........EEF :  ",X ;
	ELSE Display " Delete it's NOT  OK ........ EEF :   " ,X ;
	END_If ;
 
  Tablebtree_DeleteAll(Toto) ;** Clear All 
	

Pre-requisites

DECLARE TABLEBTREE

Remarks

return value : 0 = not found or KO , 1= found or ok

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


Copyright 2022 by Mandragore Planete

the official sites :
mgplanete.com
getms4bi.com
demos.ms4bi.com
help.ms4bi.com
ms4script.com

Download

official site :
getms4bi.com

Our purpose : Keep it simple !


written with ms4script
  • help 01.010.2022.8

MS4BI in 5 minutes