[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: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

[const] Directory

Post by Harley »

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: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko »

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: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: [const] Directory

Post by Harley »

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: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko »

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: 360
Joined: Sat Mar 18, 2006 1:41 am
Location: Germany

Re: [const] Directory

Post by Harley »

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: 1158
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Re: [const] Directory

Post by CWO »

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: 248
Joined: Mon Feb 06, 2006 6:12 am

Re: [const] Directory

Post by DevGIB »

It resolves the constant though it just doesn't parse it correctly as it appears to drop the package location?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: [const] Directory

Post by Yukiko »

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