Thank you for this idea but it does not cover this case. Your input is not long enough. t=:{{":y}} t 180548043269214561950911457875657 1.80548e32
The object is to achieve 180548043269214561950911457875657x in a defined function, so that the input 180548043269214561950911457875657 is treated as 180548043269214561950911457875657x. If you run each function that I gave below with the inputs I have given you will see what I mean. This where the numbers come from. ] permuted_vector. =: ?.~30 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25 19 0 5 16 14 ] A. permuted_vector 180548043269214561950911457875657 Now we need to go back. ] (A. permuted_vector) A. i. 30 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25 19 0 5 16 14 (A. permuted_vector) is extended by output construction of (A.). So it feeds naturally to the dyadic (A.) operator. This always produces the same permuted_vector. The challenge is feeding an extended input to the dyad. After a length of 19 digits, the type degrades to a float. So please try your own permuted_vector of length minimum 30 with these functions below. Their behavior mightshow where my ideas are misplaced. Function 1 Step 1. Run extd =: 4 : 0 n=. ((1!:1) 1 ((".@,&'x' n)) A. i. x ) Step 2. Run 30 extd 180548043269214561950911457875657 Step 3. Input and enter. 180548043269214561950911457875657 Complete. Function 2 Step 1. Run extdquotes =: 4 : 0 ((".@,&'x' n)) A. i. x ) Step 2. Run. 30 extdquotes '180548043269214561950911457875657' Complete. I might not be explaining as clearly as possible, I appreciate your patience. Ak. On Mon., Aug. 14, 2023, 12:34 'Skip Cave' via Programming, < programm...@jsoftware.com> wrote: > t=.{{":y}} > > t 12345678987654321 > > 12345678987654321 > > > datatype t 12345678987654321 > > literal > > > Skip Cave > Cave Consulting LLC > > > On Mon, Aug 14, 2023 at 1:29 PM Gilles Kirouac <g1...@myriade.ca> wrote: > > > >>> What expression allows a function to recieve an argument 'y' as a > > literal > > >>> without using quotes? > > > > None. > > > > BTW, do not rely on the output of ": (default format) to determine the > > type, because it uses a default format with a default precision. Use > > datatype instead > > > > datatype 180548043269214561950911457875657 > > floating > > datatype 18054843269214561950911457875657x > > extended > > 34j0 ": 1805480403269214561950911457875657 > > 18054804326921457349416459226316 NB. loss of precision after 15 digits > > 34j0 ": 180548043269214561950911457875657x > > 180548043269214561950911457875657 NB. no loss of precision > > > > > > > > ~ Gilles > > > > Le 2023-08-14 à 14:00, Ak O a écrit : > > > Unfortunately ": does not work in this case. > > > The length of the input causes the input to be treated as a float. The > > > result is: > > > > > > ": 180548043269214561950911457875657 > > > 1.80548e32 > > > > > > > > > > > > On Mon., Aug. 14, 2023, 11:16 'Skip Cave' via Programming, < > > > programm...@jsoftware.com> wrote: > > > > > >> ":y converts an integer in y into a literal. > > >> > > >> Skip Cave > > >> Cave Consulting LLC > > >> > > >> > > >> On Mon, Aug 14, 2023 at 11:58 AM Ak O <akin...@gmail.com> wrote: > > >> > > >>> What expression allows a function to recieve an argument 'y' as a > > literal > > >>> without using quotes? > > >>> > > >>> Below are two deficient functions. > > >>> The size of the vector is given by 'x'. The permutation > > >>> index is meant to be given by 'y'. > > >>> > > >>> My intention is treat 'y' as a literal, without needing to use quotes > > on > > >>> the input. > > >>> > > >>> This first function works by escaping to the keyboard for input > > >>> I would like rather for the function to receive the input from the > raw > > >>> argument and not have to escape to the keyboard. > > >>> > > >>> Desired Input > > >>> 30 extd 180548043269214561950911457875657 > > >>> Rather than > > >>> 30 extd '180548043269214561950911457875657' > > >>> > > >>> > > >>> This function is deficient by its operating sequence. > > >>> It escapes to keyboard, which preservs the literal type. > > >>> > > >>> extd =: 4 : 0 > > >>> n=. ((1!:1) 1 > > >>> ((".@,&'x' n)) A. i. x > > >>> ) > > >>> > > >>> 30 extd 180548043269214561950911457875657 > > >>> > > >>> Keyboard input (if this approach makes sense, can the keyboard input > > be > > >>> simulated by using y as the feed?) > > >>> 180548043269214561950911457875657 > > >>> > > >>> Result > > >>> 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25 19 > > 0 5 > > >>> 16 14 > > >>> > > >>> > > >>> > > >>> Alternative deficient function by the input form. > > >>> Yields the correct result but uses quotes in the input. > > >>> > > >>> extdquotes =: 4 : 0 > > >>> ((".@,&'x' n)) A. i. x > > >>> ) > > >>> > > >>> 30 extdquotes '180548043269214561950911457875657' > > >>> > > >>> Result > > >>> 20 12 4 29 7 17 22 11 2 27 28 23 6 21 9 3 24 10 26 13 15 1 18 8 25 19 > > 0 5 > > >>> > >>> 16 14 > > >>> > > >>> I am looking for the function that uses the input for extd that > > delivers > > >>> the result of extdquotes > > >>> > > >>> > > >>> Thank you for your help > > >>> Ak > > >>> > > ... > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm