[Therion] Define constants in files

Martin Sluka martinsluka at mac.com
Sat Dec 27 14:56:14 CET 2014

Search/replace. Any one plain text editor will do it including text editor from Therion


Odesláno z iPhonu

27. 12. 2014 v 13:28, vladimirg at mail.bg:

> 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<br> located somewhere<lang:bg>Пещера %NAME%<br>..."
> ...
>   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 известяване и други.
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20141227/ad848c14/attachment.html>

More information about the Therion mailing list