Ruud H.G. van Tol on Mon, 25 Dec 2023 17:46:44 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: reference parameters
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Date: Mon, 25 Dec 2023 17:46:37 +0100
- Delivery-date: Mon, 25 Dec 2023 17:46:44 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=isolution.nl; s=soverin; t=1703522798; bh=sozwc0KmkoTGCbu+Jc9CfrYEg5+lur3Bw/7FkexH02Q=; h=Date:To:From:Subject:From; b=GsTmGpvdcvlQd2enZv3km7F3OQhXudOd4G2bIDLcc0Bo+Cw2cWe0jcFKLhP1FmAds xbcA+aGcJvDZP6C+wfxn7Q2zIMoMv/0T4cGuGfxl4GaVzvUY0a4YDIvDtTd3yoyfpM iqU8F3FIznwxsk/UOpFenZ4yajCq0isSi+kf+cmqzcwqHQ6FRX+iz0oXsyuo5IB6cm RQQUmo1gAajJCSZbxDTVkjDWzP4gX8s01hXyfZ7ozFUHih+KOM3tgpY214BRg3g1OE meWYzqLGr1ubbtyHaX5XIhiXJITHlWH1d/mRiXDEuueNbtl+eoHOV8UkBzBZExy/lg 6ihDePgaFAhAw==
<>
? ??listput
listput( list,x,{n}):
Sets the n-th element of the list list (which must be of type
t_LIST) equal to x. If n is omitted, or greater than the list length,
appends x. The function returns the inserted element.
? L = List();
? listput(~L, 1)
%2 = 1
? listput(~L, 2)
%3 = 2
? L
%4 = List([1, 2])
Note the ~ L: this means that the function is called with a reference to
L and changes L in place.
</>
Is that explicit reference notation still relevant?
-- Ruud