bugGNU Octave - Bugs: bug #45170, Unexpected results

 
 

bug #45170: Unexpected results

Submitter:  None
Submitted:  Sat 23 May 2015 08:17:11 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Works For Me Assigned to:  None
Originator Name:  CK Raju Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 3.8.2
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 May 2015 12:21:09 PM UTC, comment #1: 

Thanks for your bug report. Both of your examples work fine for me. There isn't really a clear bug here, so closing.

I'd propose that you instead send a message to the help mailing list for suggestions about figuring out why you are seeing the behavior you are. And please do show the actual error or unexpected output instead of saying it doesn't work.

See also help dec2bin, your while loop is the same as calling dec2bin(linenumber, 15).

Mike Miller <mtmiller>
Group Member
Sat 23 May 2015 08:17:11 AM UTC, original submission:  

# case 1 === this code snippet ALWAYS works
binstring = dec2bin(linenumber); [a,b] = size(binstring);
   while (b<15),
pcode = horzcat("0", binstring);
binstring = pcode;
b = b + 1;
   end;
pcode=binstring; # Why should this be ESSENTIAL
fputs(flabel, horzcat(plabel,":",pcode,"\n"));

# case 2 === this code snippet doesn't work ALWAYS
binstring = dec2bin(linenumber); [a,b] = size(binstring);
   while (b<15),
pcode = horzcat("0", binstring);
binstring = pcode;
b = b + 1;
   end;
fputs(flabel, horzcat(plabel,":",pcode,"\n"));

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-23 mtmiller StatusNone Works For Me
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code