Hello, I am on a smartphone with family but the code seems cryptic to me. What is shrinkable? ? A variable holding a Boolean? Another thing? Usually, with a question mark, this should be a boolean function. But there is no argument… Cryptic also…
Le dim. 4 févr. 2024 à 13:46, Hill Strong <[email protected]> a écrit : > In the array1.spad file the following is defined > > shrink(r, i) == > r.logLen := r.logLen - i > negative?(n := r.logLen) => error "internal bug in flexible array" > 2*n+2 > r.physLen => r > not shrinkable? => r > if n < r.logLen then error "cannot shrink flexible array to > indicated size" > n = 0 => empty() > r.physLen := n > y := newa(n::N, a := r.f) > for k in 0 .. n-1 repeat y.k := a.k > r.f := y > r > > The line starting with > > if n < r.logLen > > can never be executed as the previous definition for n has already set > this value to r.logLen. > > I can, if anyone is interested, create a pull request to remove this > specific line from the definition. > > Hill Strong > > -- > You received this message because you are subscribed to the Google Groups > "FriCAS - computer algebra system" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/fricas-devel/CAEnaMTEMYW67h3%3DkLQnNJ%2BQ__hnyw4xUH2RKcvGSNWccQ0hEVg%40mail.gmail.com > <https://groups.google.com/d/msgid/fricas-devel/CAEnaMTEMYW67h3%3DkLQnNJ%2BQ__hnyw4xUH2RKcvGSNWccQ0hEVg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/CAHnU2db0XW5vLBwjOTfUwE4KRyYEGQu9X3Q3irSCG4k%2Bq-nZuw%40mail.gmail.com.
