help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple elisp problem with equal


From: Thien-Thi Nguyen
Subject: Re: Simple elisp problem with equal
Date: Wed, 27 Apr 2005 03:00:40 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

exits funnel <address@hidden> writes:

> (equal system-type "gnu/linux")

play w/ `type-of' to see the difference.

(type-of (+ 6 (* 6 6))) => integer

(type-of (type-of (+ 6 (* 6 6)))) => ???

> (princ system-type)
>
> evaluate to "gnu/linuxgnu/linux" rather than just
> "gnu/linux"?

there are two things to look at (for a start ;-),
namely the value of an expression and its side
effects.  one way to separate them for better
understanding is to save the value for examination
later, during the evaluation of the expression:

(setq some-var (princ system-type))

then you can do `C-h v some-var RET' after mulling
the side effects (which cannot be saved in this way).

also, try `C-h c C-j' in the *scratch* buffer.

thi


reply via email to

[Prev in Thread] Current Thread [Next in Thread]