Re: define and strings

From: Geoffrey.Coram <Geoffrey.Coram_at_.....>
Date: Tue Jul 26 2005 - 10:13:43 PDT
Arpad -

> By the way, can this string literal come from a macro then?

I would expect that this would work:

`define FILENAME "mytable.txt"

I(a,b) <+ $table_model(`FILENAME, V(a,b), ...);

because the preprocessor would place "mytable.txt" inside the
$table_model call before the syntax is checked.  This does not
conflict with the earlier contention that "$table_model can only
take a double quote enclosed string literal."

> And if string parameters are treated a constants which can
> only change at compile time, why couldn't it come from a
> string parameter?

I believe that parameters can change at *elaboration* time, 
which is subtly different from compile time.  But, as pointed
out before, it is an obvious extension to allow a string
parameter as the first argument to $table_model.


-Geoffrey
Received on Tue Jul 26 10:13:47 2005

This archive was generated by hypermail 2.1.8 : Tue Jul 26 2005 - 10:13:48 PDT