Re: Can i make a variable like those in imperative language ?
- From: student <nospam@xxxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 19:46:06 GMT
SoULiaNe wrote:
I want to have a program parameter in Prolog just like what we can do in C with something like "#define N 5". It is not necessary to be a constant, so a variable can be suffisant... but how to make a variable in Prolog ? I mean a variable like those in imperatives languages.
Thank you !
Afaik, only PDC Prolog allows you to declare constants in that way at this time, as in
CONSTANTS
dummy_var_char = '#'
keyword_flag = '$'
c_debug = 1
c_no_debug = 0but there is nothing to stop you from embedding your own macro calls in your Prolog text and running it through a macro preprocessor before you send it to your Prolog compiler/interpreter.
-- .
- References:
- Can i make a variable like those in imperative language ?
- From: SoULiaNe
- Can i make a variable like those in imperative language ?
- Prev by Date: Re: Can i make a variable like those in imperative language ?
- Next by Date: Re: What should the semantics of hierarchical modules be?
- Previous by thread: Re: Can i make a variable like those in imperative language ?
- Next by thread: Re: Can i make a variable like those in imperative language ?
- Index(es):