Menu

#7 Arguments to #sub directive

open
nobody
Directives (5)
5
2006-02-09
2006-02-09
tombs
No

Please officially support arguments to #sub directives.
I've found by accident that the following works

;--------------------------------------
#sub emitTestApps
Source: sdk\tests\{#PROD}\bindTarget_i{#TYPE}.exe;
DestDir: {app}\tests\{#PROD}; Flags: comparetimestamp
overwritereadonly; Components: {#COMP}
Source: sdk\tests\{#PROD}\geometry{#TYPE}.exe; DestDir:
{app}\tests\{#PROD}; Flags: comparetimestamp
overwritereadonly; Components: {#COMP}
#endsub

#sub emitTestData
Source: sdk\tests\{#PROD}\mandrill.ppm; DestDir:
{app}\tests\{#PROD}; Flags: comparetimestamp
overwritereadonly; Components: {#COMP}
Source: sdk\tests\{#PROD}\sample.bmp; DestDir:
{app}\tests\{#PROD}; Flags: comparetimestamp
overwritereadonly; Components: {#COMP}
#endsub

; base tests
COMP="base")
#expr emitTestApps(PROD="WIN32_X86_SOFT",
TYPE=ExeType1, COMP="base")
#expr emitTestData(PROD="WIN32_X86_SOFT", COMP="base")

;-------------------------------

I have found this to be incredibly useful. There is no
mention in the documentation of doing something like
this so I afraid that it may stop working in a future
release.

I would like to be able to have a #sub call a #sub as
well but it does not work with more than 1 argument.
See below.

; I want to do this but get errors saying COMP undefined.
; It seems to be a bug in ISPP.
#sub emitTests
#expr emitTestApps(PROD=PROD, COMP=COMP, TYPE=ExeType1)
#expr emitTestData(PROD=PROD, COMP=COMP)
#endsub

; base tests
#expr emitTests(PROD="WIN32_X86_SOFT", COMP="base")

; Even when I add the following #define in emitTests
right before the call
; to emitTestsApps I get the COMP undefined error.
#define COMP="3"

Regards

-Mark

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.