OPL snags, on 5/7/netbook. does anyone know whereabouts of
lists of errors and panics
with their meanings, like : 'OPL user 44' and ' kernel exec 3' . Thankyou,
"kernel exec 3" is kind of EPOC OS general error (like blue screen in windows :)) Program in OPL can cause it by async calls if you forgot to close timers (as far I remember, it is long time!)
"44" error I do not know, try to check OPH header files...
rgrds, Michal
Good morning everyone,
Can someone please inform me if there is Template in OPL( like C++) and how can I use it ?
Thank you veru much
Good morning Amina,
As far as I know, there is no OPL template...
This said, what exactly are you looking for / hoping to find?
Regards,Jacques
Good morning Jacques,
I'm writing a code , I' m using same PROC such as "open file ", "Research", "remove","Add" for 2 different files, so I'm looking for using template for writing small code .
Thank you very much
Sorry but such OPL skeleton program does not exist...
You will have to roll your sleeves and sweat a bit, I'm afraid
This said, if you go through your OPL SDK install folder and/or search the net, you will find numerous OPL samples, which may inspire you.
Sorry, there is no magic
Kind regards,Jacques
Ok ,maybe you don't understand me
this is example of template in C++
template <class T> T GetMax (T a, T b) { T result; result = (a>b)? a : b; return (result); }in this example , we can use T as integer of float or long ....I want do like this , but no problem i'm becoming too redI have problem ,I created a file where I saved data, i'm trying to open it with other PROC but I have error open fileBest regards,
OPL does not support polymorphism
If you need to support several types, you will need to create a procedure per type
E.g.
PROC GetMax:(a, b)IF (a > b) RETURN aELSE RETURN bENDIFENDP
PROC GetMax%:(a%, b%)IF (a% > b%) RETURN a%ELSE RETURN b%ENDIFENDP
PROC GetMax&:(a&, b&)IF (a& > b&) RETURN a&ELSE RETURN b&ENDIFENDP
As stated earlier, there is no magic, I'm afraid.
Thank you veru much , I understand now .
Can you inform me please about how creat a file in read and write mode, because I creat file in psion (M:\dat ) but I can't open it
Best regards
Hi Jacques ,
Can you help me please to resolve this problem
I creat datafile by using
CREATE title$,A,ref$,Q%
but when I want open this file by using
OPEN title$,A,ref$,Q%
I have Eroor file not open
Thank you very much in advance
Amina
Amina,
Can you please try the below and let me know if it works for you?
PROC DUMMY:IF (EXIST("M:\DAT\MYFILE.ODB")) TRAP OPEN "M:\DAT\MYFILE.ODB",a,ref$,q%ELSE TRAP CREATE "M:\DAT\MYFILE.ODB",a,ref$,q%ENDIFIF (ERR) ALERT("OPEN/CREATE FAILED!", ERR$(ERR)) RETURNENDIFFIND("Hello World!")IF (EOF) : REM Record not found! a.ref = "Hello World!" a.q% = 12345 TRAP APPENDELSE a.q% = a.q% + 1 TRAP UPDATEENDIFIF (ERR) ALERT("APPEND/UPDATE FAILED!", ERR$(ERR))ENDIFCLOSERETURNENDP
Last but not least, let me reiterate that the OPL SDK comes with numerous code samples. Studying them will help speeding up your OPL learning curve.
PS: as the Workabout MX product range and SIBO SDKs are long time discontinued products, please keep in mind there is no guaranty you will be provided with technical support for the afore mentioned items.
Hi Jacques,
Yes it worked ,with "M:\DAT\MYFILE.ODB" I couldn't see myfile in dat but with"M:\DAT\MYFILE.DBF". I can see it, I email you MYFILE ,
Can you please advice me about the way of using and display information saved in Myfile for user how doesn't know using OPL , I'm thinking about solution with excel but not sure.
Thank you very much for your help
Happy holidays Jacques
Thank you very much , did you tried EPOC http://www.garethjmsaunders.co.uk/psion/emulator32_opl.html
I tried but its not easy , I can't insert code
Keep in mind that OPL32 is NOT OPL