BasicProgram indicates that a program that does not accept realtime input from the user and is not specialized for a UI technology. This stereotype is the default when you use the Program classifier to write a custom type.
eglx.lang
Program MyProgram type BasicProgram function main() MyGradeList INT[3]{80, 90, 100}; MyAverage BIN(4,2); MyAverage = calculate(MyGradeList); SysLib.writeStdOut(MyAverage); end function calculate(myScore INT[]) returns (BIN (4,2)) numberOfScores, i, mySum INT; numberOfScores = myScore.getSize(); for (i from 1 to numberOfScores by 1) mySum = myScore[i] + mySum; end return (mySum/numberOfScores); end end
The invoked function returns the average value, and the main function writes that value to the standard output.
Record BasicProgram type Annotation { targets = [ElementKind.programPart], validationProxy = // the following value goes on one line, but is on two for display "org.eclipse.edt.compiler.binding.annotationType. BasicProgramAnnotationTypeBinding", @Stereotype } unloadOnExit boolean; end
Target | Issue |
---|---|
Java | No issues. |
JavaScript | Not supported. |