Re: DECPASS vs EXEPASS vs PROCs


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Robert G Laurin on August 17, 2016 at 05:34:00:

In Reply to: Re: DECPASS vs EXEPASS vs PROCs posted by Barbara Brazil on August 16, 2016 at 13:23:13:

Try imagining using libraries, where I have one or more Usefiles that may contain:

- A Declaratives section surrounded with a .IF DECPASS & .ENDIF DECPASS
- A Piece of Code surrounded with a .IF EXEPASS & .ENDIF EXEPASS
- One or more SubRoutines with ?

So All I need to do, is to INCLUDE this/these Libraries in all 3 sections of my program.


Hum... It might be possible if I do a SET PROCPASS = 1 just before the END. Still would be easier if the Compiler did it.


!Main Proc
! Declaratives
...
Include 'Proc1.INC' ! Include for DECPASS
Include 'Proc2.INC'
...
! Executables
Clear
...
Gosub Proc1.INIT ! Execute some code in Proc1
...
Call Proc1('Whatever')
...
A = Proc2(X)
...
Include 'Proc1.INC' ! Include for EXEPASS
Include 'Proc2.INC'
...
End
Include 'Proc1.INC' ! Include for PROCPASS
Include 'Proc2.INC'

File: Proc1.INC

.If DECPASS
SubRoutine Proc1(a$)
.Endif DECPASS
!
.IF EXEPASS
... Some code here
.ENDIF EXEPASS
!
.IF PROCPASS ! <--- This is wishful thinking
SubRoutine Proc1(a$)
Length Dynamic & Local a$
...
ProcReturn
END
.ENDIF PROCPASS

File: Proc2.INC

.If DECPASS
Numeric Proc2(a)
.Endif DECPASS
!
.IF EXEPASS
... Some code here
.ENDIF EXEPASS
!
.IF PROCPASS
SubRoutine Proc2(a)
Length 8.0 & Local a,b,c
...
ProcReturn b
END
.ENDIF PROCPASS




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]