octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65153] Unexpected error when using the ~ outp


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #65153] Unexpected error when using the ~ output placeholder
Date: Fri, 12 Jan 2024 16:49:56 -0500 (EST)

Follow-up Comment #3, bug#65153 (group octave):

I confirm this too. The intermediate variable needed to do the array
concatenation [] does not seem to be defined. With a cell concatenation {} it
does work... Also, and probably related, trying to assign the output of flipud
to the `ans` special variable and then retrieving it, doesn't work either.
E.g. with the following modified example


function x = ueml ()
  flipud ((1:10)')
  x = ans;
  ## x = flipud ((1:10)');
endfunction

I get 

>> [~] = ueml ()
error: invalid call to script /opt/share/octave/8.3.0/m/help/ans.m
error: called from
    ans
    ueml at line 3 column 5


While assigning explicitly the output of flipud to a regular variable (as in
the commented code) just works. 

Even more weird, if I put the call to flipud in a dummy if block, it works as
expected (for concatenation as well):


function x = ueml ()
  if (true)
    flipud ((1:10)')
    x = ans;
  endif
endfunction




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65153>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]