Psion 3a - Load OPL in Calculator - Scion

This is a discussion on Psion 3a - Load OPL in Calculator - Scion ; Hi I wrote an OPL function following the instructions in the Psion 3a user manual and saved it on the Internal Disk, naming it modfnc. I wanted to use the function in the Calculator and I went to Special, Load ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: Psion 3a - Load OPL in Calculator

  1. Psion 3a - Load OPL in Calculator

    Hi
    I wrote an OPL function following the instructions in the Psion 3a user
    manual and saved it on the Internal Disk, naming it modfnc.
    I wanted to use the function in the Calculator and I went to Special, Load
    OPL but it just said No File and using the tab key did not let me choose my
    OPL file. Yet the file is there when I look at the main display. What am I
    missing out?

    Thanks
    Evi



  2. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:

    > Hi
    > I wrote an OPL function following the instructions in the Psion 3a user
    > manual and saved it on the Internal Disk, naming it modfnc.
    > I wanted to use the function in the Calculator and I went to Special, Load
    > OPL but it just said No File and using the tab key did not let me choose
    > my OPL file. Yet the file is there when I look at the main display. What
    > am I missing out?


    You probably didn't 'compile' it.
    Use Psion + T and save it.
    This will make it an usable function for Calc to use.



  3. Re: Psion 3a - Load OPL in Calculator

    Iordani wrote:

    > You probably didn't 'compile' it.
    > Use Psion + T and save it.
    > This will make it an usable function for Calc to use.


    Iordani,

    I don't think he did compile it: the syntax is wrong and should read
    __________

    PROC moda,b)
    RETURN a-INT(a/b)*b
    ENDP
    __________

    And then Evi will find a little problem about "Variable types" ... .

    }David

  4. Re: Psion 3a - Load OPL in Calculator


    "David Catterall" wrote in message
    news:3qivi.21438$j7.383478@news.indigo.ie...
    > Iordani wrote:
    >
    > > You probably didn't 'compile' it.
    > > Use Psion + T and save it.
    > > This will make it an usable function for Calc to use.

    >
    > Iordani,
    >
    > I don't think he did compile it: the syntax is wrong and should read
    > __________
    >
    > PROC moda,b)
    > RETURN a-INT(a/b)*b
    > ENDP
    > __________
    >
    > And then Evi will find a little problem about "Variable types" ... .
    >
    > }David


    You are both right. She had no idea about the Compile and Save. I made the
    adjustments you suggested David. It now reads as you state above.

    I couldn't see Compile in the Menu in the module but I wonder whether
    Translate is the same thing. But that gave me the message - Wrong Number of
    Variables. So something still isn't right, is it?
    Evi



  5. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:

    > You are both right. She ...


    Ooops! Sorry about that.

    > I couldn't see Compile in the Menu in the module but I wonder whether
    > Translate is the same thing.


    It is. The process turns your typing (.opl) into a program (.opo) that
    the Psion can Run.

    > But that gave me the message - Wrong Number of
    > Variables.


    Are you sure it wasn't "Wrong number of arguements"? Did you take up my
    suggestion of what the typing should have been exactly?

    Regards,
    }David

  6. Re: Psion 3a - Load OPL in Calculator


    "David Catterall" wrote in message
    news:YWlvi.21441$j7.383838@news.indigo.ie...
    > Evi wrote:
    >
    > > You are both right. She ...

    >
    > Ooops! Sorry about that.
    >
    > > I couldn't see Compile in the Menu in the module but I wonder whether
    > > Translate is the same thing.

    >
    > It is. The process turns your typing (.opl) into a program (.opo) that
    > the Psion can Run.
    >
    > > But that gave me the message - Wrong Number of
    > > Variables.

    >
    > Are you sure it wasn't "Wrong number of arguements"? Did you take up my
    > suggestion of what the typing should have been exactly?
    >
    > Regards,
    > }David


    Yes, you're right David, it does say wrong number of arguments.
    Yes, I've typed exactly what you said
    PROC moda,b)
    RETURN a-INT(a/b)*b
    ENDP

    (with the : in the right place this time)
    then I went to the Menu and chose Translate but got the Wrong Number Of
    Arguments message. Why is this?

    This time when I went to Calculator, however, it did find the file and
    loaded it successfully - so you were right it was looking for an OPT, but
    when I typed
    mod(3,4)
    in Calculator I got 'Unexpected Name'





  7. Re: Psion 3a - Load OPL in Calculator



    >
    > "David Catterall" wrote in message
    >
    > > Evi wrote:
    > >
    > > > You are both right. She ...

    > >
    > > Ooops! Sorry about that.
    > >
    > > > I couldn't see Compile in the Menu in the module but I wonder whether
    > > > Translate is the same thing.

    > >
    > > It is. The process turns your typing (.opl) into a program (.opo) that
    > > the Psion can Run.
    > >
    > > > But that gave me the message - Wrong Number of
    > > > Variables.

    > >
    > > Are you sure it wasn't "Wrong number of arguements"? Did you take up my
    > > suggestion of what the typing should have been exactly?
    > >
    > > Regards,
    > > }David

    >
    > Yes, you're right David, it does say wrong number of arguments.
    > Yes, I've typed exactly what you said
    > PROC moda,b)
    > RETURN a-INT(a/b)*b
    > ENDP
    >
    > (with the : in the right place this time)
    > then I went to the Menu and chose Translate but got the Wrong Number Of
    > Arguments message. Why is this?
    >
    > This time when I went to Calculator, however, it did find the file and
    > loaded it successfully - so you were right it was looking for an OPT, but
    > when I typed
    > mod(3,4)
    > in Calculator I got 'Unexpected Name'
    >

    There's something basic that I'm missing out about this.

    I just tried another program with a simpler formula. This time I called the
    file MSum and wrote

    PROC msuma,b)
    RETURN a+b
    ENDP

    I ran the Show Error and the arrow remained on the top line. I 'translated'
    the program. It asked if I wanted to run it and it said Wrong Number of
    Arguments.

    I tried using it in Calculator and got the message
    Unexpected Name.

    Evi





  8. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:

    > when I typed
    > mod(3,4)
    > in Calculator I got 'Unexpected Name'


    Load module
    Type mod3,4)




  9. Re: Psion 3a - Load OPL in Calculator


    "Iordani" wrote in message
    news:5i6as8F3ltkh5U1@mid.individual.net...
    > Evi wrote:
    >
    > > when I typed
    > > mod(3,4)
    > > in Calculator I got 'Unexpected Name'

    >
    > Load module
    > Type mod3,4)


    That's it! That's IT!!!!! It worked. Thank you, all of you

    Evi



  10. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:
    > ...
    > (with the : in the right place this time)
    > then I went to the Menu and chose Translate but got the Wrong Number
    > Of Arguments message. Why is this?


    You are not, I think, reporting accurately. The translate works OK (else you
    would still not be able to load the OPO module in Calculator). But you do
    get this error if you try to execute the module as an item of OPL. This is
    because your PROC acts as a "main()" function (in terms of other languages)
    and a main function of that sort takes no arguments at all. This is because
    just executing the module as a program offers no way to pass any arguments
    so your "(a,b)" are two too many!

    > This time when I went to Calculator, however, it did find the file and
    > loaded it successfully - so you were right it was looking for an
    > OPT [OPO], but when I typed
    > mod(3,4)
    > in Calculator I got 'Unexpected Name'


    This is because the call is written the same way as the code, viz
    "mod3,4)". You missed out the colon. I tried it in my Psion 3mx and it
    answered "3" which is maybe what you would expect...

    Have fun; Mike.
    --
    If reply address = connectfee, add an r because it is free not fee.



  11. Re: Psion 3a - Load OPL in Calculator

    David Catterall wrote:
    > I *am* enjoying this nostalgia ... you're making me want to go out
    > and buy a black-and-white television set!


    Not me; I don't think that Psions are that retro!

    But I admit to turning the colour on my set down to B&W when a surgical
    documentary was making me feel queasy!

    Mike.
    --
    If reply address = connectfee, add an r because it is free not fee.



  12. Re: Psion 3a - Load OPL in Calculator


    "Mike Coon" wrote in message
    news:13brv44jjbvkbc@corp.supernews.com...
    > Evi wrote:
    > > ...
    > > (with the : in the right place this time)
    > > then I went to the Menu and chose Translate but got the Wrong Number
    > > Of Arguments message. Why is this?

    >
    > You are not, I think, reporting accurately. The translate works OK (else

    you
    > would still not be able to load the OPO module in Calculator). But you do
    > get this error if you try to execute the module as an item of OPL. This is
    > because your PROC acts as a "main()" function (in terms of other

    languages)
    > and a main function of that sort takes no arguments at all. This is

    because
    > just executing the module as a program offers no way to pass any arguments
    > so your "(a,b)" are two too many!
    >
    > > This time when I went to Calculator, however, it did find the file and
    > > loaded it successfully - so you were right it was looking for an
    > > OPT [OPO], but when I typed
    > > mod(3,4)
    > > in Calculator I got 'Unexpected Name'

    >
    > This is because the call is written the same way as the code, viz
    > "mod3,4)". You missed out the colon. I tried it in my Psion 3mx and it
    > answered "3" which is maybe what you would expect...
    >
    > Have fun; Mike.
    > --

    Thanks for explaining that, Mike. So when I 'Translated the program and it
    asked me if I wanted to run the program, the correct answer should have been
    No.
    Thanks, I will thoroughly enjoy my Psion 3a. I'm busily bidding on Ebay for
    one of those cables that connect it your PC.
    Evi



  13. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:

    > Thanks, I will thoroughly enjoy my Psion 3a.


    Hi Evi (+Mike +Iordani),

    I just got back from "Midsomer Murders" to find that you'd
    all solved the mystery here !!!

    Best wishes,
    }David

    ps Nice, troll-free Group this.

  14. Re: Psion 3a - Load OPL in Calculator

    Evi wrote:
    > Thanks for explaining that, Mike. So when I 'Translated the program
    > and it asked me if I wanted to run the program, the correct answer
    > should have been No.


    An alternative (though I haven't tried it myself) would be to add an extra
    PROC before your "moda,b)", without any parameters and with any other name
    you like. The purpose of this PROC could be to display on the screen various
    test runs of mod, to verify its operation before using it in Calculator.
    Then an equally "correct", and useful, answer to "run the program?" could be
    "Yes".

    Regards, Mike.
    --
    If reply address = connectfee, add an r because it is free not fee.



+ Reply to Thread