[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scanf and maximum field width
From: |
G. Bürger |
Subject: |
scanf and maximum field width |
Date: |
Thu, 28 Jun 2007 12:04:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070116 Thunderbird/2.0b2 Mnenhy/0.7.4.666 |
I noticed that for
[i1 i2 c] = sscanf("12", "%1i%1i", "C")
octave returns
i1 = 12
i2 = [](0x0)
c = 1
I would have assumed that instead
i1 = 1
i2 = 2
c = 2
is returned, no?
Gerd
- scanf and maximum field width,
G. Bürger <=