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 16:42:57 +0200 Message-ID: <83k0359aj2.fsf@gnu.org> References: <83v8mq80yv.fsf@gnu.org> <0BvSrutcSlaWe-zepacwPMNYoc90vk5DENM9W5Rf0v8_aMa-ZzPF_UYBwZn6Hxr3GAIu23ivbaCXeZG5Yzzc-VHmsBIhADepPmwkqdxRcuQ=@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16690"; 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 15:44:09 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 1p2ChV-0004AL-JU for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 15:44:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2Ch1-0004jR-KT; Mon, 05 Dec 2022 09:43:39 -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 1p2Cgn-0004hi-8E for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 09:43:28 -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 1p2Cgl-0000V2-Ge for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 09:43:24 -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=8RjTZEv7qRufXmtoAu7lI7mt+WrRec1vXSECr6qJxT0=; b=mqBAeMrqfynF jrp25Fn4ySajPaXVvq3isKwtDPGR2rAO5S1FWZX0gzdwe3PLvX30kJYxsSZq/Qe/Oj4dfLW5jXf7P eAgCZHRegOpW70sRWdsjeSE4oB6v/bZIVJ+arK7FdOBOh8Ms2YNUqJ47OIR4idX58P/KJDZDrnlIC P03Ze0ADAiJirBL7mbBRR0lEIT6iCeTjCYmqogN6SMMGfMvM+AqmmvMJMUPsN02/Hw8qKfvHVc0jq C3Ix5C9qC8IQHDsS7oN1TrCyQf4579XMqX8mVnm5KqPkK5lMc35XWY4Fp9ox2s50Nv/9j4IHhOUNo 0HuqLh1fUPa2D8J7FNoNuw==; 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 1p2Cgb-00066W-KJ for help-gnu-emacs@gnu.org; Mon, 05 Dec 2022 09:43:21 -0500 In-Reply-To: <0BvSrutcSlaWe-zepacwPMNYoc90vk5DENM9W5Rf0v8_aMa-ZzPF_UYBwZn6Hxr3GAIu23ivbaCXeZG5Yzzc-VHmsBIhADepPmwkqdxRcuQ=@protonmail.com> (message from Heime on Mon, 05 Dec 2022 13:56:53 +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:141400 Archived-At: > Date: Mon, 05 Dec 2022 13:56:53 +0000 > From: Heime > Cc: help-gnu-emacs@gnu.org > > ------- Original Message ------- > On Monday, December 5th, 2022 at 12:54 PM, Eli Zaretskii wrote: > > > > > Date: Mon, 05 Dec 2022 11:40:44 +0000 > > > From: Heime heimeborgia@protonmail.com > > > > > > 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. > > Correct, a vector with five elements. Then the function 'vector' is what you need to use here.