The distinction between "symbol" and "identifier" is rather subtle,
particularly in the interpreter - an identifier being something to
which we may assign a value and a symbol being something for which we
may substitute a value. Somewhere between Symbol and identifiers we
also have something called Variable. Of course the domain Symbol where
scripts are implemented need not be be synonymous with identifiers but
the interpreter encourages us to think that this might be so since
every identifier is treated like a Symbol unless it has previously
been assigned some value.

(1) -> x

   (1)  x
                                                            Type: Variable(x)
(2) -> x[1]

   (2)  x
         1
                                                                 Type: Symbol
(3) -> x[1]::Variable(x[1])

   (3)  x
         1
                                                      Type: Variable(*01x(1))
(4) -> eval(x[1]+x[2],x[1]=1)

   (4)  x  + 1
         2
                                                    Type: Polynomial(Integer)
(5) -> y:=1

   (14)  1
                                                        Type: PositiveInteger
(6) -> x+y

   (6)  x + 1
                                                    Type: Polynomial(Integer)

(7) -> x[1]:=1

   The form on the left hand side of an assignment must be a single
      variable, a Tuple of variables or a reference to an entry in an
      object supporting the setelt operation.


On 3 February 2015 at 13:58, Ralf Hemmecke <[email protected]> wrote:
>>> How would you propose to assign a value to something like
>>>
>>> (a (x1 x2) (y1) (z1 z2))
>>>
>>> Isn't assigning a value something you can only do to a symbol in
>>> Lisp?
>
>> Currently assignment to scripted symbols is not supported.
>
> I wouldn't even have expected that an assignment of a value to something
> of type Symbol is allowed.
>
> s of type Symbol *is* a value. What Bill means/wants is scripted
> variable names (or automatic treatment of anything of type Symbol as
> variable name (in the sense of the programming language SPAD)).
>
>> In principle we could add support for such symbols to serve as
>> Spad/interpreter variable names.
>
> Please no. That would change the SPAD language (if it is ever becoming
> formal).
>

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to