The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   Help
(Moderator: Mikesan)
   Procedures and Local
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Procedures and Local  (Read 409 times)
UnrealNeil
Member




   


Posts: 19
Procedures and Local
« on: Apr 7th, 2003, 11:37am »
Quote Quote Modify Modify

Why does this work /trans late
=================
main:
global a,b
b=99
 
fred:
print b
=================
but this doesn't
main:
local a
 
fred:
local b
b=99
print b
=================
I can't seem to get a translate if I have more that one procedure in my opl file...  Am I missing something?
Boris
Administrator




   
WWW

Posts: 552
Re: Procedures and Local
« Reply #1 on: Apr 7th, 2003, 8:01pm »
Quote Quote Modify Modify

I can't seem to get a translate if I have more that one procedure in my opl file?

There can't be more than one (1) procedure in a single OPL file!
Because of the limited ressources of the organiser, a program is never loaded as one, but just the current procedure.
 
This will definitely work:
file MAIN.OPL
MAIN:
GLOBAL A
A=123
FRED:(234)

file FRED.OPL
FRED:(param)
LOCAL B
B=345
PRINT A,param,B

Which will print 123 234 345
« Last Edit: Apr 7th, 2003, 8:03pm by Boris »

Triholerahduliäöhh gugguh !! (tyrolean joy jodler)
Rough translation: There's a new build of Psi2Win!!
Email: boris[at]psion2[dot]org
UnrealNeil
Member




   


Posts: 19
Re: Procedures and Local
« Reply #2 on: Apr 8th, 2003, 11:34am »
Quote Quote Modify Modify

Thanks
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.
top