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

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

Re: Setting variables, argumunts in defun


From: Christopher Dimech
Subject: Re: Setting variables, argumunts in defun
Date: Sat, 13 Feb 2021 17:33:21 +0100

I am trying to use pcase on a string, but do need some direction
on how to use it.

(pcase (string-match "enable" objv)
      (
       (setq devi 0.18)
       (setq scal 0.2) )

    ( (string-match "disable" objv)
     (setq devi 0.0)
     (setq scal 1.0) )

    )


> Sent: Sunday, February 14, 2021 at 4:14 AM
> From: wael-zwaiter@gmx.com
> To: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Setting variables, argumunts in defun
>
> I would like to set up devi and scal by selecting either one or
> the other.  Wow can I do this in elisp.  Should I pass parameters
> to the function.  Can one pass a string, then check its contents?
>
> (defun deviscal ()
>
>   (setq devi 0.18)
>   (setq scal 0.2)
>
>   (setq devi 0.0)
>   (setq scal 1.0) )
>
>
>
>
>



reply via email to

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