From bug-octave-request at che dot utexas dot edu Tue Nov 1 12:58:16 1994 Subject: Re: Octave I/O From: "John C. Campbell" To: Steve Swinnea cc: bug-octave Date: Tue, 01 Nov 1994 12:58:13 +22305350 Steve Swinnea wrote: | John, | | Is this correct behavior? | | octave:1> function a=foo() | > printf("Enter a winning number: "); | > a = scanf( "%f" ); | > endfunction | | octave:2> foo | 5 | Enter a winning number: ans = 5 | | Note that the printf doesn't occur until after the value that scanf | expects is entered. My TA was trying to write something that prompts | for a value and came upon this. I believe that this is incorrect behavior, but I feel like this is something that is out of my Octave coding domain. It looks like a problem in the way Octave returns scanf output perhaps jwe will see the real source of the problem. John