[Therion] Define constants in files

vladimirg at mail.bg vladimirg at mail.bg
Sat Dec 27 13:28:35 CET 2014




Hi


In development languages I'm used to defining various constants values in
the files, but I couldn't find such in Therion 
Have you considered adding this feature? 


For example I use the cave name in several places in the .th and .thc
files. Then for the next cave I usually copy the template and change the
name in all the places it is mentioned. This will be easier to do with a
constant value that is changed only in one place.


Something like this:


 === in TH files ===
DEFINE %NAME%='My cave name'


survey %NAME% -title "%NAME% cave located somewhereПещера %NAME%..."
...
 input %NAME%.th2
endsurvey


=== in THC files ===
layout ZZZ
 map-comment "The %NAME% is a very nice cave, etc, etc"
endlayout
export map -projection extended -output %NAME%-xelev.pdf 
export map -projection plan -output %NAME%-plan.pdf


So you can change the DEFINE %NAME% only at the begining of the file and
the value will be reflected when compiling in every place the %NAME% is
used.


Or am I too picky 


Vladimir


-------------------------------------
Mail.BG: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар - 20 GB пощенска кутия, 1 GB прикрепен файл, безплатен POP3, мобилна версия, SMS известяване и други. http://mail.bg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20141227/3f235555/attachment.html>


More information about the Therion mailing list