Work With Maxbox Insider
Work With Maxbox Insider
Work With Maxbox Insider
As you may know there's no simple solution put a macro because the step
of the preprocessor has to be the first to expand. So a macro is not part of
the source code and the best way is to set a macro always as a one liner
or somewhere else in comment.
All macros are marked with yellow. One of my favour is #locs: means lines
of code metric and you get always the certainty if something has changed
by the numbers of line. So the editor has a programmatic macro system
which allows the pre compiler to be extended by user code I would say
user tags. Below an internal extract from the help file All Functions List:
maxbox_functions_all.pdf
Some macros produce simple combinations of one liner tags but at least
they replace the content by reference in contrary to templates which just
copy a content by value.
After the end. of the code section you can set a macro without comment
signs so you can enlarge your documentation with version and time
information like:
#tech:perf: 0:0:1.151 threads: 4 192.168.56.1 12:06:17 4.2.2.95
Or you put a macro behind a code-line, so this is not the end of the line, a
second time test is
maxcalcF('400000078669 / 2000123')
//#perf>0:0:1.163
and we get: 199987.740088485
maXbox3 568_U_BigFloatTestscript2.pas Compiled done: 6/18/2015
2937127^(-1)17915749^(-1)2082607
maxcalcF('29*37*(127^-1)*179*(15749^-1)*2082607');
>> 199987.740088485
maxcalcF('29*37*(127^-1)*179*(15749^-1)*2082607');
//#tech>perf: 0:0:1.190 threads: 6 192.168.56.1 12:49:55 4.2.2.95
//>>> 199987.740088485
2
Result:= mbRes.ToString;
finally
//FreeAndNil(mbResult);
mbRes.Free;
mbRes:= Nil;
end;
end;
java -version
must be captured with different parameters like /k or in combination.
begin
filename:= '';
try
if filename = '' then
RaiseException(erCustomError,
'Exception: File name cannot be blank');
except
emsg:= ExceptionToString(ExceptionType, ExceptionParam);
//do act with the exception message i.e. email it or
//save to a log etc
writeln(emsg)
end;
end;
NAVIGATOR=Y
MEMORYREPORT=Y
[WEB]
IPPORT=8080
//for internal webserver menu /Options/Add Ons/WebServer2
IPHOST=192.168.1.53
ROOTCERT=filepathY //for use of HTTPS and certificates
SCERT=filepathY
RSAKEY=filepathY
APP=C:\WINDOWS\System32\calc.exe
//set path to an external app
MYSCRIPT=E:\mXGit39991\maxbox3\examples\330_myclock.txt
//start script of menu /View/MyScript
VERSIONCHECK=Y
//checks over web the version
The last entry VERSIONCHECK can enhance the load speed cause there's
no request to HTTP and also no sense for firewalls to signal an outgoing
socket call!
If you don't want execute scripts from the web you can stop this in the inifile maxboxdef.ini with N.
This is seen in the following figure.
LINENUMBERS=Y
EXCEPTIONLOG=Y
EXECUTESHELL=N
MEMORYREPORT=Y
BOOTSCRIPT=Y
The ini file format is still popular; many configuration files (such as
Desktop or Persistence settings file) are in this format. This format is
especially useful in cross-platform applications, where you can't always
count on a system Registry for storing configuration information. I never
was a friend of the Registry so you can also start maXbox from a stick.
history or another root files with settings that have changed, otherwise the
unzip IDE overwrites it.
Wise men speak because they have something to say; Fools, because
they have to say something. -Plato
Feedback @ max@kleiner.com
Literature: Kleiner et al., Patterns konkret, 2003, Software & Support
https://github.com/maxkleiner/maXbox3/releases
11
TMyBigInt = class
private
Len: Integer;
Value: AnsiString;
procedure Trim;
procedure Shift(k: Integer);
procedure MultiplyAtom(Multiplier1: TMyBigInt; Multiplier2: Integer);
public
constructor Create(iValue: Integer = 0);
procedure Add(Addend1, Addend2: TMyBigInt);
procedure Multiply(Multiplier1, Multiplier2: TMyBigInt); overload;
procedure Multiply(Multiplier1: TMyBigInt; Multiplier2: Integer); overload;
function ToString: string;
procedure CopyFrom(mbCopy: TMyBigInt);
end;
12