[const] Directory

Here you can post threads on the development of the current release of the core (100)

Moderator: POL Developer

Post Reply
Harley
Forum Regular
Posts: 345
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

[const] Directory

Post by Harley » Sat Mar 16, 2019 5:28 pm

Hi everybody! I guess my ideas will be very usefull and helpfull for all of us!
I don't know, if someone make this offer yet, but as you saw in my subject, I propose to make possible to add in const directory path to include/cfg/ and etc.

For example, something like that:

const WWW_DIR_INC := ":www:registration";

I hope for your support and joint development!

With best regards, Harley!

Yukiko
Distro Developer
Posts: 2634
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko » Sat Mar 16, 2019 7:58 pm

If this is a feature request I do not understand. You can define a constant like that in your scripts. Maybe I am missing something.

Harley
Forum Regular
Posts: 345
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: [const] Directory

Post by Harley » Sun Mar 17, 2019 3:47 am

Yukiko wrote:
Sat Mar 16, 2019 7:58 pm
If this is a feature request I do not understand. You can define a constant like that in your scripts. Maybe I am missing something.
Yukiko, yesterday I tried to make one include which contain all info for my server directories. And when I compiled script, I got error!
I maked inc with them, for example:

Code: Select all

const DIR_GDFI     :=  ":Lib:inc_public/GetDataFileInfo";
After it, I include this constants file and use one of my constants, that have a directory:

Code: Select all

include ":Lib:const_public/shard-consts";
include DIR_GDFI;
And compiled script:
Unable to read include file '.../pkg/player/login/inc_public/DIR_GDFI.inc'
Compilation failed.
After that, I thought about new feature for all of us. :grouphug:

Yukiko
Distro Developer
Posts: 2634
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko » Sun Mar 17, 2019 10:28 am

Ah. Now I understand. You want to use a string constant as part of the include statement. This is interesting but I am not sure it is possible currently because of the way eCompile works.

Harley
Forum Regular
Posts: 345
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: [const] Directory

Post by Harley » Sun Mar 17, 2019 5:20 pm

Yukiko wrote:
Sun Mar 17, 2019 10:28 am
Ah. Now I understand. You want to use a string constant as part of the include statement. This is interesting but I am not sure it is possible currently because of the way eCompile works.
Yep! Thank you for retranslate my thoughts. Its some difficult to find needed words at 03:00 AM ))

I think this thing will make easily understanding and connection for programming and make workspace more clear.

User avatar
CWO
POL Expert
Posts: 1148
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: [const] Directory

Post by CWO » Sun Mar 17, 2019 9:20 pm

This won't work. eCompile grabs the includes before assigning constants for the very reason that includes can contain constants. It doesn't go through includes one at a time and assign the constants since it needs to know all of the functions and constants available to it before it begins to process the output to the ecl.

DevGIB
Grandmaster Poster
Posts: 222
Joined: Mon Feb 06, 2006 6:12 am

Re: [const] Directory

Post by DevGIB » Sun Mar 17, 2019 11:06 pm

It resolves the constant though it just doesn't parse it correctly as it appears to drop the package location?

Yukiko
Distro Developer
Posts: 2634
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko » Mon Mar 18, 2019 12:15 am

Though I admit I have limited knowledge of programming languages, I am not aware of any language that allows this, no compiled language anyway.

Post Reply