From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 15 Jul 2003 16:43:48 +0300 From: Alexey Starinsky X-Mailer: The Bat! (v1.62r) Organization: TZ-TEL X-Priority: 3 (Normal) Message-ID: <445124328.20030715164348@tavrida.com> To: Alexey Morozov Subject: =?koi8-r?B?UmU6IFtDb21tXSDhINEg1NXUIMLBx9Ug1yBwcmludGYoMykgzsHbxcwgOi0p?= =?koi8-r?B?ICh0YWtlIHR3byk=?= In-Reply-To: <200307151639.37828.alex@hop-go.com> References: <200307151639.37828.alex@hop-go.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 15 Jul 2003 13:43:45.0752 (UTC) FILETIME=[1CC3BD80:01C34AD7] X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.2 Precedence: list Reply-To: community@altlinux.ru List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2003 13:43:56 -0000 Archived-At: List-Archive: List-Post: Здравствуйте, Alexey, Не далее как 15 июля 2003 г., 12:54:35, Вы написали: AM> Выдержка из man 3 printf (секция the field width): AM> Instead of a decimal digit string one may write `*' or `*m$' (for some AM> decimal integer m) to specify that the field width is given in the next AM> argument, or in the m-th argument, respectively, which must be of type int. AM> Внимание, вопрос: AM> что согласно этой доке напишет AM> printf("%0*d %d %d %d\n", 2, 4, 8, 16); AM> printf("%0*1$d %d %d %d\n", 2, 4, 8, 16); AM> printf("%0*2$d %d %d %d\n", 2, 4, 8, 16); AM> ? AM> Полученный мной результат меня несколько удивил (в первую очередь, своей AM> нелогичностью). Что самое смешное, этот результат совпадает на Linux AM> (glibc-2.2.6), FreeBSD (4.8-STABLE) и MS Windows 2000 (MS VC++ 6). Я так AM> понимаю, пора заполнять lawsuit "SCO против всех", в котором говорить, что AM> printf украден, потому что совместим по багам :-). AM> P.S. Но в MSDN, по крайней мере, дока про '*' соответствует истине ('*m$' не AM> задокументирован вовсе) Мда... попробовали. И правда, фигня какая-то :) Задумались... -- С уважением, Алексей Старинский mailto:staa -at- tavrida -dot- com