473,606 Members | 2,453 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

printf extensions for output of arrays

Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.

Thanks
Nov 15 '05 #1
27 2957
jacob navia wrote:
Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.


Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementation is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.

Nov 15 '05 #2
In article <11************ **********@f14g 2000cwb.googleg roups.com>,
<ku****@wizard. net> wrote:
jacob navia wrote:
Has anyone here any information about how arrays can be
formatted with printf? I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.
Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementati on is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.


Over here in comp.lang.c we would have just said that such extensions
are not part of the C standard and so are not on topic here...

--
Chocolate is "more than a food but less than a drug" -- RJ Huxtable
Nov 15 '05 #3
In article <11************ **********@f14g 2000cwb.googleg roups.com>,
<ku****@wizard. net> wrote:
jacob navia wrote:
Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.


Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementati on is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.


Funny on so many levels.
You have a career in comedy, to be sure.

Nov 15 '05 #4
Kenny McCormack wrote:
In article <11************ **********@f14g 2000cwb.googleg roups.com>,
<ku****@wizard. net> wrote:
jacob navia wrote:
Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.


Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementati on is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.


Funny on so many levels.
You have a career in comedy, to be sure.


If you have a point, make it. That comment was too obscure to qualify.

Nov 15 '05 #5

<ku****@wizard. net> wrote
Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.


Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementation is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.

A question about whether it is possible to pass an array to printf() (as
some languages allow for their analgous output statements) would be topical.
However Jacob Navia knows C well enough not to need to ask this.
The question is therefore a proposal for an extension to the language, and
thus topical on comp.std.c, but not on comp.lang.c.
Nov 15 '05 #6
On 6 Nov 2005 12:43:46 -0800, in comp.lang.c , ku****@wizard.n et
wrote:
Kenny McCormack wrote:

Funny on so many levels.
You have a career in comedy, to be sure.


If you have a point, make it. That comment was too obscure to qualify.


Just ignore Kenny, he's one of the resident trolls over here in CLC.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #7
"Malcolm" <re*******@btin ternet.com> writes:
<ku****@wizard. net> wrote
jacob navia wrote:
Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.


Non-standard extension to C are not, in themselves, on-topic for
comp.std.c. You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementation is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.

A question about whether it is possible to pass an array to printf()
(as some languages allow for their analgous output statements) would
be topical. However Jacob Navia knows C well enough not to need to
ask this. The question is therefore a proposal for an extension to
the language, and thus topical on comp.std.c, but not on
comp.lang.c.


That's assuming that jacob was actually proposing an extension to the
language. That's the most reasonable interpretation, but he didn't
actually say so, and I'm hesitant to make any assumptions.

jacob, can you clarify your question? Are you asking about the
language as it's currently defined (topical for comp.lang.c, but the
answer is simply "no"), about non-standard extensions to the language
(off-topic), or about a proposed enhancement for the next version of
the standard (topical in comp.std.c)?

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #8
Keith Thompson wrote:
"Malcolm" <re*******@btin ternet.com> writes:
<ku****@wizar d.net> wrote
jacob navia wrote:

Has anyone here any information about how arrays can be
formatted with printf?

I mean something besides the usual formatting of each element
in a loop. I remember that Trio printf had some extensions but
I do not recall exactly if they were meant for arrays.

Non-standard extension to C are not, in themselves, on-topic for
comp.std.c . You could bring it on-topic by suggesting that some such
extension be standardized, or by asking whether a conforming
implementati on is allowed to provide such extensions, or any of a
number of other variations. As it stands, your inquiry should have been
posted only to comp.lang.c.


A question about whether it is possible to pass an array to printf()
(as some languages allow for their analgous output statements) would
be topical. However Jacob Navia knows C well enough not to need to
ask this. The question is therefore a proposal for an extension to
the language, and thus topical on comp.std.c, but not on
comp.lang.c .

That's assuming that jacob was actually proposing an extension to the
language. That's the most reasonable interpretation, but he didn't
actually say so, and I'm hesitant to make any assumptions.

jacob, can you clarify your question? Are you asking about the
language as it's currently defined (topical for comp.lang.c, but the
answer is simply "no"), about non-standard extensions to the language
(off-topic), or about a proposed enhancement for the next version of
the standard (topical in comp.std.c)?


As I said in comp.lang.c, I have a customer that wants that stuff.
I supposed that it is a common extension to printf and I just wanted
to know if other compilers have done this to be compatible with
them.

I will probably do as gcc, that implements a printf register
functionality :
http://docs.biostat.wustl.edu/cgi-bi...on%2520Example

but it is not specific to arrays, what could be better, I do not know.

It *could* be a useful extension to the printf function probably, but I
do not want to add yet another sin to my already long list of extensions
requests :-)


Nov 15 '05 #9
jacob navia <ja***@jacob.re mcomp.fr> writes:
Keith Thompson wrote:

[...]
<ku****@wiza rd.net> wrote
jacob navia wrote:
>Has anyone here any information about how arrays can be
>formatte d with printf?
>
>I mean something besides the usual formatting of each element
>in a loop. I remember that Trio printf had some extensions but
>I do not recall exactly if they were meant for arrays.
[snip] That's assuming that jacob was actually proposing an extension to the
language. That's the most reasonable interpretation, but he didn't
actually say so, and I'm hesitant to make any assumptions.
jacob, can you clarify your question? Are you asking about the
language as it's currently defined (topical for comp.lang.c, but the
answer is simply "no"), about non-standard extensions to the language
(off-topic), or about a proposed enhancement for the next version of
the standard (topical in comp.std.c)?


As I said in comp.lang.c, I have a customer that wants that stuff.
I supposed that it is a common extension to printf and I just wanted
to know if other compilers have done this to be compatible with
them.

I will probably do as gcc, that implements a printf register
functionality :
http://docs.biostat.wustl.edu/cgi-bi...on%2520Example

but it is not specific to arrays, what could be better, I do not know.

It *could* be a useful extension to the printf function probably, but I
do not want to add yet another sin to my already long list of extensions
requests :-)


Ok, that's much clearer.

Topicality in this case is a tricky question. The C standard
specifically allows extensions, so extensions aren't *inherently*
off-topic. I suppose I'd argue that a general question about what
extensions are out there is topical (more in comp.lang.c than in
comp.std.c), but detailed discussions of a particular implementation
should be taken to a system-specific newsgroup.

That's just my opinion; others are likely to differ.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2579
by: Peter Ammon | last post by:
It's my understanding that the printf() function is declared as int printf(const char * restrict format, ...); in stdio.h. And loosely speaking, if a parameter is declared as restricted, then accesses to the object must go through that parameter. Does this mean that printf("%s", "%s");
7
96285
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %% should be used. Wouldn't it have been better (from design perspective) if the same escape character had been used in this case too. Forgive me for posting without verfying things with any standard compiler, i don't have the means for now.
29
17545
by: whatluo | last post by:
Hi, c.l.cs I noticed that someone like add (void) before the printf call, like: (void) printf("Timeout\n"); while the others does't. So can someone tell me whether there any gains in adding (void) to printf. Thanks, Whatluo.
3
7477
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work on her local machine. Everything looks pretty good. OpenLDAP/cygwin works great. PostgreSQL works great. Apache runs. PHP runs. But when I try to connect to my PostgreSQL server using PHPPgAdmin, I
16
19694
by: Jordan Abel | last post by:
I have written this function and was wondering if anyone else could point out if there's anything wrong with it. The purpose is to substitute for printf when in a situation where low-level I/O has to be used for whatever reason, and memory allocation cannot be used - mainly it's become for me an exercise in interpreting printf-like format strings, and i thought i'd post it here to see if anyone can point out any bugs in it - i.e. anything...
69
5539
by: fieldfallow | last post by:
Hello all, Before stating my question, I should mention that I'm fairly new to C. Now, I attempted a small demo that prints out the values of C's numeric types, both uninitialised and after assigning them their maximum defined values. However, the output of printf() for the long double 'ld' and the pointer of type void 'v_p', after initialisation don't seem to be right. The compiler used was gcc (mingw) with '-Wall', '-std=c99' and
4
2000
by: pai | last post by:
Hi , Can any one tell me how this statement of printf is behaving . how the last digit is printed int a=2,b=4,c=7; printf("%d",printf("%d %d:",a,b)); //answer to this was 2 4:3
25
9680
by: jacob navia | last post by:
The C99 standard forgot to define the printf equivalent for complex numbers Since I am revising the lcc-win implementation of complex numbers I decided to fill this hole with "Z" for instance double _Complex m = 2+3*I; printf("%Zg\n",m);
5
1728
by: lithiumcat | last post by:
Hi, I was wondering whether there is a standard-compliant way to extend printf with a new %code that is not yet reserved (e.g. %r) with a given argument type. My guess would be to write a function that looks like « int my_printf(const char *fmt, ...); », with a special processing of fmt to replace the new %code with the correct data, and then hand over the processed fmt and the remaining arguments to vprintf.
0
7959
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8310
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5968
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5466
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3942
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3987
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2451
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1305
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.