From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Defining an array in a let clause. Date: Mon, 05 Dec 2022 14:54:48 +0200 Message-ID: <83v8mq80yv.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26021"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 05 13:56:08 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p2B0y-0006V4-CO for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 13:56:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2B0d-0006FL-DL; Mon, 05 Dec 2022 07:55:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2B0Y-0006EX-0i for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 07:55:43 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2B0X-0000Ju-P0 for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 07:55:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OgHNYECnJMwCTY5s389v9ffCcGC9HKP9dEkqoPueXfc=; b=puCPan8W0Xdi Xk0m502SEiqgtdk9zsYChR0J5YsRodkaloeaddZ8dIKi4zEZPu2l7ABzrgHVd5RjRSenenEM2l0/n xO842kAb+BO1lnGzxsgNxnVfeVBq2dB8RHnGZUlz7H/POZTwC3Q+9grPbbpSlFN5H7LS5mlOMlzV/ snzRBwJYYjor3r/EqabN2JDBq0/kAKAZHEAtIAfdrjllx3z8HNhANewNcTuPikyLyIvkixPlMKogX Ufo9eIy39XfE41ICsxLAW/ouDiSL0FeIyH5RweioFnPMGzdtDKIyiT5Sv95XpuvwUtH7YRrwUVT+x qTvuzrwAoKSuSGx1i5Z/wQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p2Azv-00054h-Rk for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 07:55:37 -0500 In-Reply-To: (message from Heime on Mon, 05 Dec 2022 11:40:44 +0000) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141392 Archived-At: > Date: Mon, 05 Dec 2022 11:40:44 +0000 > From: Heime > > > How can I set up an array of five elements in a let clause. > > (let ( (ss (nth 0 (decode-time))) ; seconds > (mm (nth 1 (decode-time))) ; minutes > (hh (nth 2 (decode-time))) ; hours > (us (nth 2 (current-time))) ; microsecond > (ps (nth 3 (current-time))) ; picosecond > (lc (make-array '(5))) ) There are no arrays in Emacs. Do you mean vector? if so use the function 'vector' to construct a vector. If, OTOH, you want a list, use the function 'list' instead.