W dniu 28.01.2017 o 17:41, Riccardo (Jack) Lucchetti pisze:
On Sat, 28 Jan 2017, Marcin Błażejowski wrote:
> Or can I do something like "eval set omp_num_threads" [of course not in
> the current sence of eval] to get string "omp_num_threads: positive
> integer, currently 4" which I could parse next?
This is a bit baroque, but seems to work:
<hansl>
set echo off
set messages off
function scalar ompthds(void)
scalar ret
outfile s --buffer --quiet
set omp_num_threads
outfile --close
l = strlen(s)
c = ""
loop while c != " " --quiet
c = substr(s, l, l)
l--
endloop
sscanf(s+l, " %d", ret)
return ret
end function
n = ompthds()
printf "As of now, %d\n", n
</hansl>
I was thinking about something like that but not serious... ;)
It remains be a way for having a dynamic matrices in Turbo Pascal.
Marcin
--
Marcin Błażejowski