smart.Object
Member
Hello everyone... me again .
I have a procedure which does exactly the same thing, but needs to be invoked from different programs (lets call them x and y (y runs only from within x)). I would like to create either a .include or .p (I don't know what exactly is the difference) file that would be called by those programs.
What I did was just cut out the procedure from x and stuck it into a separate .i files, replacing the whole procedure with a call to this file. It runs fine from x, but doesn't even access it from y. Is there some kind of access permissions I have to set for the whole .i file? Or I cannot simply invoke a .i file from two programs?
Then I tried creating a .p file, defining all the variables and trying to pass it the reference number needed to perform the procedure. But I am not sure if I defined shared variables and shared buffers correctly b/c it doesn't want to run from either program.
here is the first segment of the .p code:
is this even legal to declare buffers like that?
Also I changed the type of variables inside the x to "new shared"... is this correct..
Thanks in advance for any input.
GB
I have a procedure which does exactly the same thing, but needs to be invoked from different programs (lets call them x and y (y runs only from within x)). I would like to create either a .include or .p (I don't know what exactly is the difference) file that would be called by those programs.
What I did was just cut out the procedure from x and stuck it into a separate .i files, replacing the whole procedure with a call to this file. It runs fine from x, but doesn't even access it from y. Is there some kind of access permissions I have to set for the whole .i file? Or I cannot simply invoke a .i file from two programs?
Then I tried creating a .p file, defining all the variables and trying to pass it the reference number needed to perform the procedure. But I am not sure if I defined shared variables and shared buffers correctly b/c it doesn't want to run from either program.
here is the first segment of the .p code:
Code:
{incl\globals.i}
{incl\sysvar.i}.
/* shared varaibles */
DEF shared var hold-order-no as char no-undo.
def shared var hold-oper-no as int.
def shared var hold-dept-no like dept.dept-no.
DEF shared VAR FtString as char.
def shared var hold-seq-no as int.
DEF shared VAR MyDecimal AS DEC init 25.34.
/* system variables */
def var next-line as int init 1.
def var Vrise72 as dec.
def var vtempang as dec.
def var vtempch as dec.
def var vtempa as dec.
def var vtempb as dec.
def var angleradians as dec.
def var vdecresult as dec.
def var sinvrise72 as dec.
def var cosvrise72 as dec.
def var sinvchord72 as dec.
def var cosvchord72 as dec.
def var vsinradinch like est-prop.vradinch.
def var vcosradinch like est-prop.vradinch.
def var varctyp as char.
/* buffers */
def shared buffer x-est-routing for est-routing.
def shared buffer x-est-bom for est-bom.
is this even legal to declare buffers like that?
Also I changed the type of variables inside the x to "new shared"... is this correct..
Thanks in advance for any input.
GB