This is the OPL version of our combination
You need Epoc OPL SDK (see tools section).
Below is the opl
For .opo, please
download the ZIP file.
FONT KFontCourierNormal18&, KgStyleBold%
PRINT "Combination > Epoc > OPL"
PRINT "Enter value for 'n'";
PRINT ": ";
PRINT "Enter value for 'p'";
PRINT ": ";
PRINT "Factorial(";n%;") = ";factorial:(n%)
PRINT "Factorial(";p%;") = ";factorial:(p%)
PRINT "Factorial(";n%-p%;") = ";factorial:(n%-p%)
PRINT "Combination(";n%;",";p%;") = ";combination:(n%,p%)
PRINT "[Press 'Enter']"
IF (n% <= 1)
ELSE RETURN n% * FACTORIAL:(n% - 1)
PROC combination:(n%, p%)
RETURN factorial:(n%) / (factorial:(n% - p%) * factorial:(p%))
OPL is a BASIC-like language. There's hardly any
Another great asset of OPL is that you can develop
your apps on your device as well... No need to carry your desktop
computer in your bag!
Just like PocketC (for Palm and Pocket PC), OPL is
a very convenient language for on-device development.
(source code) and Combination.opo
(executable) in any folder on your device or on the emulator, locate
the .opo and run
it! As EZ as 123 :)
There's also an ASCII version of the source code in
that you may want to load in your OPL Editor with the import feature.
This is equivalent to the installation procedure above.
The core functions are: factorial:(),
combination:() and go:().
Here's another screenshot of WINS emulator with the
skin of a Sony-Ericsson P800:
To do this, you need to set up a P800.ini
file in the \Epoc32\Data
folder that contains the skin description. For your convenience,
the P800.bmp is in
the .zip mentioned
above. Here's how the .ini