Page 1 of 1
MATC - length limit
Posted: 11 Nov 2009, 20:23
by mulvrova
Hello,
is there any limit for the length of MATC expression? is it possible to get around it?
Martina.
Re: MATC - length limit
Posted: 12 Nov 2009, 12:09
by Juha
Hi,
there is a limit of 16 K characters within the .sif file of a matc expression using the
$ blah blah
format. MATC itself has a 4 K character buffer for an expression (in line ~94 in
matc/src/parser.c). It should be relatively easy to replace this by a dynamic
allocation, or at least increase the size, see below however.
Also, the runtime evaluated MATC string (param= variable x; real matc "blah blah")
is stored in a string of length 128 characters. The latter could of course use functions and
variables defined with the former (each of length 4K chars), so that in practice there
should be no hard limits ?
Regards, Juha
Re: MATC - length limit
Posted: 15 Sep 2017, 10:08
by annier
Juha wrote:Also, the runtime evaluated MATC string (param= variable x; real matc "blah blah")
is stored in a string of length 128 characters. The latter could of course use functions and
variables defined with the former (each of length 4K chars), so that in practice there
should be no hard limits ?
An example for this wonderful answer by Juha is given at
viewtopic.php?f=3&t=4070&start=0&hilit= ... 15d68dccae
Yours Sincerely,
Anil Kunwar
Re: MATC - length limit
Posted: 01 Jan 2018, 20:30
by annier