

- 
-    
- 
- 
-    
- API









.


Mini Script -       .       Swahili.               : , ,    ,      .   Mini Script     -   .           .      Blitz3D     ,      API.










   .


  Mini Script   :

		-	Local
		-	Static
		-	Global

      :

1.  -   ,      .              .

2.  -        .              .

3.  -  ,          .

     Local. : 

Local a b c

           (        ,       ).

   Static,  Global

     :

 	-	Null			Null
		-	Integer			10
  	-	Floating point		3.14
		-	String			"hello!"

    .         .











     .   ,      .           .   :

mov	my_variable	10

  mov   my_variable  10.


        .        add:

add	10	15	my_variable

    add           my_variable.   -      .       ,        .

          ,        .     ,        .











    ,  Mini Script    :   .   .

      .      ,       API.

      function:

function	function_name	argA	argB	argN

: 

my_function	-	 
arg_a...argN	-	 

      end_function

   

function	my_function	a	b
	local result
	add	a	b	result
	ret	result
end_function

    my_function   a  b        result.     ret -       .     -     Null.


      invu:

invu	function_name	return_to	a b c d...

: 

function_name 		-   
return_to		-       .  ,      .    .
a b c d...		-    (   /       )     (  ).

:

invu	my_function	output	x y z

  .              .    invg,  :

invg	function_name	return_to	a b c d...

:

invg	print	garbage	"Hello World!"

               _main.









   


 Mini Script                 .        ,   .    :

#label_name

 label_name      ,    "_".

      jmp. :

#begin
invg	"print"		garbage		"Endless loop..."
jmp	begin

        c     .     -   print   .    .

  jmp     jif  jit.            true  false.  jif       Null, 0   .  jit, ,         .    jif:


#begin
inc	i

invg	print	garbage	i

ce	i	10	result
jif	result	begin

:

-  inc   i  
-   print       i
-  ce     i 10
-      (i   10)     


:         .             end. :

jmp

#to_end
end









API


API Mini Script                 ,        .      Mini Script  SE_Initialize()

      SE_InvokeGlobalFunction(). :

Function SE_InvokeGlobalFunction(Name$)
	If Name="print" Then Print "print: "+SE_ToStringArg(0)
End Function

        :

SE_IntArg(Index[, DefValue])			-   
SE_FloatArg(Index[, DefValue])			-     
SE_StringArg(Index[, DefValue])			-   

SE_ToIntArg(Index[, DefValue])			-     
SE_ToFloatArg(Index[, DefValue])		-       
SE_ToStringArg(Index[, DefValue])		-     

DefValue -    .

        SE_ArgType(Index).       SE_ARGUMENTS_NUMBER

 -       .

       :

SE_ReturnNull()
SE_ReturnInt(Value%)
SE_ReturnFloat(Value#)
SE_ReturnString(Value$)

   SE_LoadScript(FileName$)    SE_TScript.

       SE_CallFunction(Script.SE_TScript, Name$).        SE_ExecScript(Script.SE_TScript, FunctionIndex)

    SE_CopyScript(Script.SE_Script, CopyValues).  CopyValues=True         .



    SE_DeleteScript(Script.SE_Script).


 ! =)






