I currently have the following line in a number of related programs:
const TASK = '...'; { name of task }
where ... is replaced by the name of the task.
To simplify my life, I would like the ... to be taken from a file named TASKNAME. In shell scripts, I do it like
TASK = `cat TASKNAME`
In make files, I do
TASK = $(shell cat TASKNAME)
How can I do it in FreePascal?
Note that this file TASKNAME just has the name in it, no quotes etc. Thus, {$INCLUDE TASKNAME} will not work.
Apparently, I need a mechanism related to {$INCLUDE %...%}, but then for the content of a file, rather than the date or so.
Thanks for your suggestions,
Tom Verhoeff
