Page 1 of 1
[23 Feb 2012] @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by nexus
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 23 Feb 2012 13:32:26 -0000
It seems you cannot include files like this:
Code: Select all
const #constant1="path/to/dir/"
const #constant2="filename"
@Include #constant1..#contant2
I wonder why this is the case, since both Strings are constants. The following examples work (according to the documentation) for constnats:
Code: Select all
const #consttest1 = (5*10) / 2
or
const #consttest2 = #consttest1 * 5
regards, nexus
[23 Feb 2012] Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by nexus
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 23 Feb 2012 13:39:35 -0000
And the following seems also not possible
file1.hws:
Const #MYCONST="path/to/dir/file2.hws"
file2.hws:
@INCLUDE #MYCONST
The following error occurs then:
"The constant #myconst has already been decleared"
So, I wonder, how I can include a file whose location or name is not known before that file exists? Is there a way to dynamically include files?
regards, nexus
[23 Feb 2012] Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by nexus
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 23 Feb 2012 13:42:26 -0000
Since I previously made a mistake, I deleted that post and wrote it again. So, here is the problem description:
The following seems also not possible
In file1.hws:
Const #MYCONST="path/to/dir/file1.hws"
In file2.hws:
@INCLUDE #MYCONST
The following error occurs then:
"The constant #myconst has already been decleared"
So, I wonder, how I can include a file whose location or name is not known before that file exists? Is there a way to dynamically include files?
regards, nexus
[25 Feb 2012] Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 25 Feb 2012 12:17:07 +0100
It seems you cannot include files like this:
const #constant1="path/to/dir/" const #constant2="filename"
@INCLUDE #constant1..#contant2
I wonder why this is the case, since both Strings are constants.
Yes, that's currently not supported but you're right it should be supported for consistency reasons. I'll add it to the to do list.
[25 Feb 2012] Re: Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 25 Feb 2012 12:19:42 +0100
And the following seems also not possible
file1.hws:
Const #MYCONST="path/to/dir/file2.hws"
file2.hws:
@INCLUDE #MYCONST
The following error occurs then:
"The constant #myconst has already been decleared"
So, I wonder, how I can include a file whose location or name is not known before that file exists? Is there a way to dynamically include files?
The name of the include file needs to be known at compile time. It is not possible to include files whose names are only known at run time.
But the above behaviour is the same as in your previous mail. Hollywood currently doesn't support any string constants in the preprocessor commands. I'll try to support them in the next version.
[01 Apr 2012] Re: Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by airsoftsoftwair
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 01 Apr 2012 15:16:51 +0200
So, I wonder, how I can include a file whose location or name is not known before that file exists? Is there a way to dynamically include files?
Hmm, actually, I cannot reproduce this problem. It seems to work fine. Could you present more details please?
[02 Apr 2012] Re: @include & constants
Posted: Sat Jun 13, 2020 5:32 pm
by nexus
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 02 Apr 2012 09:23:31 -0000
Hmm, actually, I cannot reproduce this problem. It seems to work fine. Could you present more details please?
Sorry, actually, I seem to have forgotten myself what the problem was

I tried to recreate the problem and I couldn't see the error message again. So, I probably did some other mistake.
What I tried in general is to include a script whose name is not known in beforehand. However
'
@INCLUDE #SOMECONST'
seems to be fine.
Sorry, for my confusing emails
nexus