User Guide For EJC0.4 final

Preparations:

Download EJC 0.4 final binary file To a local directory, and unzip it,then run file EJC0.4finalcvs.jar.

Example1: Using Java data type



Example2: Using enhanced array variable



Example3: Using hexadecimal and octal number



Example4: Using String variable



Example5: Using java invoking



Example6: Usage of evm.lang.math.Equation

This class is very powerful whit equation problems, at 0.4 version you can use it's method "reso()"to find a root of a Equation which you defined. for example, you want to find "f[x]=x*x*x+2*x*x-5"equation's root.

The origin form constructor for evm.lang.math.Equation is Equation(String equ,float minX,float maxX). Parameter equ express your defining equation; Parameter minX express equation region most left side, and it is essential parameter to find a root. Parameter maxX express equation region most right side, and it is essential parameter to find a root. NOTE: <1>if Equation class could not find tow point which maked f[x1]*f[x2]<0 during (minX,maxX), a Exception will thawed out; <2>the equation must start with "f[x]="and the variable name in the equation body is only named "x"in order to simplified analyze. <3>get another useage of this class,you can read here.

Example7: Usage of full path import and class EMath.

Now in ejc.lang.Math have the two functions about matrix multiplication, can let you complete the operation of matrix multiplication. Their original form is Math.muti(float[ ] [ ], float ), and Math.muti(float [ ] [ ], float [ ] [ ]). At the same time, you can be very convenient to observe the result that gets. Above caption show how to use these functions.

Example8: Usege the array variable's lenght proprety.



Example9: Usege of anonymous array variable.



Example10: Usege of instanceof operation.



Example10: Usege of for control sentence.



Example11: Write your own inster sort.



Example12: usage of final key world.



Example13: usage of If control sentence.



Example14: invoke java I/O operations.



Example15: usage of do while control sentence and Java regular expressions.

Note:the usage of regex expression in EJC is not same as using it Java, for any \-delimited regex expression metacharacter needs not to be delimited once again when it's used in EJC code,e.g.to use regex expression like \d(\w) in EJC,you need not to transform it to \\d(\\w).

Example16: usage of EJC.in.readxxx().

Now you can get your keyboard input by using the mthods like readXXX() of EJC.io.EinputStream.,the above picture show you how to using EJC.in.readString().To get more information about class EinputStream,you could read EJC javadoc.

Example17: Run system shell commands and executable files.

you can run the system shell commands or executable files(e.g. *.exe files) in a separate process by using exec(...) mthods of class EJC,To get more information about class EJC,you could read EJC javadoc.

Example18: usage of switch control sentence.

Note:To use "switch" control sentence of EJC0.4, should take care for the "default" sentence must not appear before "case" sentence.we will fix this limitation at EJC 0.5 version.

Example19: usage of Mathematical modeling.

You can use the classes in the package EJC.lang.math CoordinateSystem3D to easily render a form "y = 2 * (Math.cos (x * x) * Math.sin (z * z)) / (Math. exp (0.25 * (x * x + z * z))) - 1.0 "expression. This class is to use javascript as the interpretation of the expression language engine, and use the right-handed coordinate system as a coordinate system, so the y-axis is upward. However, the use of this class has some limitations. First, the expression on the right root operation is best not to appear because of a negative result of the operation will result in a javascript exception, and we hope to break the next version of the restriction. Second, the class passed to the constructor of the parameters can not be too much, otherwise it will lead to memory overflow or Java stack overflow exception. Because when the computer rendered image will consume a large amount of system resources.

m3d_7

Note:To use "switch" control sentence of EJC0.4, should take care for the "default" sentence must not appear before "case" sentence.we will fix this limitation at EJC 0.5 version.

Supported Languages

cn mc kr us us us

Join FAQs