log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Archive Edition 27:2 reviewed (News:)
- Drag'n'Drop 13i3 edition reviewed (News:1)
- Wakefield Show 2024 in Pictures (News:5)
- April 2024 News Summary (News:2)
- RISC OS 5.30 arrives (News:2)
- WROCC May 2024 meeting - Gerph talks games (News:)
- Upgrading your RISC OS system to 5.30 (News:2)
- WROCC May 2024 meeting on wednesday - Gerph talks games (News:)
- uniprint upgraded to 4.50 (News:)
- PhotoDesk 3.23 released (News:)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
The Icon Bar: Programming: There's a triple-dot ellipsis in C!
 
  There's a triple-dot ellipsis in C!
  Stoppers (07:27 3/6/2008)
  filecore (07:39 3/6/2008)
    Stoppers (08:23 3/6/2008)
 
Simon Willcocks Message #107549, posted by Stoppers at 07:27, 3/6/2008
Member
Posts: 302
Has that always been there, or is it something new?

I've been writing C since the mid eighties and never noticed it!

switch (i) {
case 1...54: whatever
}
  ^[ Log in to reply ]
 
Jason Togneri Message #107550, posted by filecore at 07:39, 3/6/2008, in reply to message #107549

Posts: 3867
I was beginning to wonder, I've never seen an ellipsis without triple dots. Are you the sort of person who also says Personal PIN Number?
  ^[ Log in to reply ]
 
Simon Willcocks Message #107551, posted by Stoppers at 08:23, 3/6/2008, in reply to message #107550
Member
Posts: 302
I started out early on with Pascal, which uses two dots for ranges of values but, iirc, it was still called an ellipsis. (I can't find any Pascal or Modula-2 textbooks to check.)

It's like spelling computer program in the american way, just a convention I've got used to.

Anyway, I knew (but forgot) about its use as a placeholder for extra parameters (a strange feature I've only ever used in printf, etc.).

The usage I'd not seen before was in switch statements (and looking at Stroustrup, third edition, it doesn't seem to be a long time feature of C++, at least). I don't have any C language manuals around because I know it all!

I don't talk about PINs, but I've been known to use the verb "to InterRail" - it's my language and I can do what I damn well please with it! tongue

[Edit: Yay, I'm not completely mad!]
http://en.wikipedia.org/wiki/Ellipsis
"In some programming languages (including Perl, Ruby, and Pascal), a shortened two-dot ellipsis is used to represent a range of values given two endpoints[...]"

The case range thing is a gcc extension to C.

[Edited by Stoppers at 10:53, 3/6/2008]
  ^[ Log in to reply ]
 

The Icon Bar: Programming: There's a triple-dot ellipsis in C!