Go Back   Velocity Reviews > Newsgroups > C Programming
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

C Programming - How to convert Infix notation to postfix notation

 
Thread Tools Search this Thread
Old 11-07-2009, 08:25 AM   #231
Default Re: How to convert Infix notation to postfix notation


Seebs wrote:
) On 2009-11-06, Willem <> wrote:
)> It should not recurse, I think It should only grab the declarations from
)> the named file.
)
) What if the named file refers to types it got from another file?

Err. (Thinking this up as I go along)

The declarations can only depend on types from other files if these are
from #include statements, so the #import should follow all the #include
statements to check for the external definitions. I think ?

)> Well, no. All you get are the declarations, basically.
)> Like I said, you #import the .c file, not the .h file.
)
) And what if the declarations depend on the defines?

Well, you could also say that the prototypes themselves have that info in
them, so that the compiler can check for compatibility of the calls, but
that to be able to use them in other code, you would still need to #include
them ?

Like that, the #import statements are used for all the common cross-file
linking of functions and variables, and then the #includes are for those
things (like definitions) that are shared across multiple files.

)> Although I see what you mean. Perhaps it could also pick up the variable,
)> struct and enum declarations (not static and in file-scope of course) ?
)
) Yeah, but that starts getting finicky.
)
) static enum foo { foo_a, foo_b };
) extern int whoops(enum foo bar);
)
) Obviously, we should pick up "whoops". What is its prototype?

err... Is that legal ?

If you have 'static enum foo { foo_a, foo_b } global_foo;'
Then I would guess the enum itself would/should be globally visible.
(As it's currently irrelevant.)

But like I said, it's just an idea I'm running with right now.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT


Willem
  Reply With Quote
Old 11-07-2009, 08:58 AM   #232
Kenny McCormack
 
Posts: n/a
Default .NET (Was: Re: How to convert Infix notation to postfix notation)
In article <a3b48702-27fe-4faa-8997->,
spinoza1111 <> wrote:
>On Nov 7, 12:02*am, Seebs <usenet-nos...@seebs.net> wrote:
>> On 2009-11-06,spinoza1111<spinoza1...@yahoo.com> wrote:
>>
>> > I think what bothers you clowns is that working a few hours on my
>> > commute, I can craft a solution that works (with commonsense clerical
>> > changes on your system) in a language I don't like and which I haven't
>> > used for almost twenty years, whereas you could not do this, not in a
>> > million years, in an unfamiliar language. I'd dare ya to do the
>> > problem in C Sharp: you can get C Sharp free. But you won't try
>> > because you're incompetent.

>>
>> No, I won't try because I have no interest at all in C Sharp. *(And
>> actually, I don't think I can functionally get it free, because I
>> don't have a Windows

>
>El cheapo HP netbook: less than 500.00. Stop smoking and you can save
>up for one.


Caveat: I've never had any inclination to investigate it, but ...

Based on my reading, when I first started looking at .NET, there is
nothing per se that ties .NET to MS Windows. And, in fact, there are
implementations for other platforms, including Linux (and no, I don't
mean by running a Windows emulator).

Of course, MS isn't completely stupid. I'm sure there are gotchas
involved in using a non-Windows implementation. But, still, given that
this is a newsgroup obsessed with so-called "accuracy" (so labeled for
what should, by now, be obvious reasons), we should feel safe in
poo-poo'ing the notion that .NET is MS Windows only.

Incidentally, on the subject of things MS, let me re-iterate what I've
said all along about what really makes this NG tick. That is, a common
hatred of things MS. And believe me, I know of what I speak. I used to
be one. But at some point, to paraphrase St. Paul, you have to leave
childish things behind. Basically, once you realize that they aren't
getting you anywhere.

My basic thesis is that the lunacy that is CLC, pretty much came about
when, in the early 90s, the Unix-heads (and being once myself, I use
that term with love) realized that the world was going MS. And it
****ed them off (as it did me, for a long time). And so, rather than
see their beloved newsgroup(s) descend into endless discussions of
"lpParam", "GetWindowTitleName()", etc, they concocted this "what's in
the standard and only what's in the standard" nonsense. And that's
where we are today...



Kenny McCormack
  Reply With Quote
Old 11-07-2009, 09:02 AM   #233
Kenny McCormack
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
In article <slrnhf9t05.smc.usenet->,
Seebs <usenet-> wrote:
....
>Hint: There are no citations for that, because everyone consistently agrees
>that Systems Hungarian is crap. Well, everyone but you.


This of course is false, in the CLC sense of the term, since I am sure I
could find one person (in fact, with a little research, maybe even a
dozen) people who still like it.

So, we see Seebs go down in flames (*), once again...

(*) No pun intended...



Kenny McCormack
  Reply With Quote
Old 11-07-2009, 09:37 AM   #234
Seebs
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
On 2009-11-07, spinoza1111 <> wrote:
> Duh, change the big H to a widdle H. That was the problem.


There were other problems.

> Non-
> Microsoft systems don't have the power and generaliity of Microsoft
> systems and therefore fail, like you, to see the forest for the
> trees.


This really isn't a power/generality question. It's a design tradeoff,
and different companies have made different choices.

> Like an incompetent manager in a dysfunctional company you actually
> believe that repeating lies and half truths make them true,


Man, you just blew out another milspec irony meter. That quote is awesome
coming from someone who uses "As I have said" as a way to introduce claims
for which he's never presented any kind of support other than his own
assertions.

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!


Seebs
  Reply With Quote
Old 11-07-2009, 09:43 AM   #235
Seebs
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
On 2009-11-07, spinoza1111 <> wrote:
> I think "everyone" here


Not just here, though. Pretty much everywhere.

> We have learned that Seebach merely sends problems on to
> real programmers,


No, we have learned that you can't read for comprehension.

I wrote the filesystem interface code that we use for all our builds; it's
about 5k lines of code, written in three weeks, and we've had three bug
reports on it in a year of heavy use.

I don't actually change the compiler internals, 'cuz we subcontract that
to specialists, but that doesn't change much.

> The fact is that in the detailed design of a large program you should
> be able to identify the ranges of all significant values, and this
> means that you should be able to assign them a systems Hungarian
> prefix.


No, it doesn't.

For one thing, systems Hungarian is the wrong choice for that, because the
ranges of values aren't necessarily defined by those types; for instance,
"long" might not be the same size on different supported targets. In many
cases, the correct range is not related to a specific type.

For a concrete example, if you are storing "an inode number", the correct
type is ino_t, not int or long, and you don't need to know the range --
because the range is "whatever values the system yields in the range covered
by the existing type". When you're referring to a file, you don't need a
prefix to identify the inode; you just CALL it an inode and you're done.
Same thing goes for a whole lot of other standard types.

There are cases where it makes sense to indicate type information, but
usually systems Hungarian is the wrong way to do it. Consider, for instance,
that both an array index and the size of a block of memory are presumably
size_t. In systems Hungarian, used by idiots, they are described as being
the same type because they have the same range of values. In apps Hungarian,
used by people who are not as stupid, thye are not described as having
the same type because, while they have the same range of possible values,
the values are not interchangeable. Mistaking the range of values for the
data type is pretty much a newbie mistake.

> People with actual experience in crafting large programs know
> this.


People with actual experience in recognizing the use of vague appeals
to nonspecific authority to make up for the lack of a real argument
are familiar with your posting style.

-s
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!


Seebs
  Reply With Quote
Old 11-07-2009, 10:17 AM   #236
Kenny McCormack
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
In article <slrnhfagei.jf4.usenet->,
Seebs <usenet-> wrote:
>On 2009-11-07, spinoza1111 <> wrote:
>> I think "everyone" here

>
>Not just here, though. Pretty much everywhere.
>
>> We have learned that Seebach merely sends problems on to
>> real programmers,

>
>No, we have learned that you can't read for comprehension.
>
>I wrote the filesystem interface code that we use for all our builds; it's
>about 5k lines of code, written in three weeks, and we've had three bug
>reports on it in a year of heavy use.


Not into status at all, are we???

Nope, nope, nope.

Notes:
1) Granted, if somebody attacks you, it is pretty hard to resist the
temptation to start singing your virtues (listing your
accomplishments)
2) This point (#1 above) illustrates why it is a bad thing to claim
to not be motivated by status. Sooner or later (and in this
case, it didn't take long), you're going to end up looking like
a hypocrite (or worse...)



Kenny McCormack
  Reply With Quote
Old 11-07-2009, 10:48 AM   #237
Nick
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
(Kenny McCormack) writes:

> In article <slrnhfagei.jf4.usenet->,
> Seebs <usenet-> wrote:
>>On 2009-11-07, spinoza1111 <> wrote:
>>> I think "everyone" here

>>
>>Not just here, though. Pretty much everywhere.
>>
>>> We have learned that Seebach merely sends problems on to
>>> real programmers,

>>
>>No, we have learned that you can't read for comprehension.
>>
>>I wrote the filesystem interface code that we use for all our builds; it's
>>about 5k lines of code, written in three weeks, and we've had three bug
>>reports on it in a year of heavy use.

>
> Not into status at all, are we???
>
> Nope, nope, nope.
>
> Notes:
> 1) Granted, if somebody attacks you, it is pretty hard to resist the
> temptation to start singing your virtues (listing your
> accomplishments)
> 2) This point (#1 above) illustrates why it is a bad thing to claim
> to not be motivated by status. Sooner or later (and in this
> case, it didn't take long), you're going to end up looking like
> a hypocrite (or worse...)
>


I'm not convinced that saying "I'm capable of X, and I've done Y" in
response to "you cann't do anything and have never done anything" is
about status. Opening a conversation like that, sure. But giving it as
factual information in response to a challenge is pretty much all you
can do other than accept the original claim.
--
Online waterways route planner: http://canalplan.org.uk
development version: http://canalplan.eu


Nick
  Reply With Quote
Old 11-07-2009, 10:50 AM   #238
Nick Keighley
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
On 6 Nov, 16:21, Keith Thompson <ks...@mib.org> wrote:
> Nick Keighley <nick_keighley_nos...@hotmail.com> writes:
>
> > the monster computers never went away they just changed names. There's
> > nothing stopping you from going back to a personnel computer. Just
> > pull out the network connection and turn off the password protection.
> > I don't recall having to book a terminal recently.

>
> <OT>
> Turn off password protection? *I suppose you could do that, but I
> never would.
> </OT>


nor me, but it was one of the things that was bothering him



Nick Keighley
  Reply With Quote
Old 11-07-2009, 10:54 AM   #239
Seebs
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
On 2009-11-07, Nick <3-> wrote:
> I'm not convinced that saying "I'm capable of X, and I've done Y" in
> response to "you cann't do anything and have never done anything" is
> about status. Opening a conversation like that, sure. But giving it as
> factual information in response to a challenge is pretty much all you
> can do other than accept the original claim.


In particular, our poster child for inability to comprehend that other
people could be different from him has not considered the possibility
that someone might care about the factual claim without thinking of it
as a status claim. He sees things a given way; no matter what anyone
says, he always translates anything other people say into his frame
of reference.

Given his reaction, I can conclude that, in fact, Spinny's remark
might well have been intended as a status claim. (There is some humor
value in Spinny trying to make hay from my autism, while Kenny tries to
ignore the logical implications of it. At most one of them is right...)
It wouldn't have occurred to me to think of that as status; a factual
statement to do with qualifications, yes, but qualifications aren't
the same thing as status; they don't impose any social duties on other
people, they're just information to help you weigh claims you aren't
otherwise sure how to evaluate.

The people at Code Sourcery know compilers better than I do, no doubt
about it. I'm sure Kenny can tell us all whether that means that they're
higher-status than me or lower-status than me. I have no clue. They're
better at a technical task; I can tell them what technical task to perform.
How does that work out? Of course, the real answer is that it's not
a status relationship; it's a contractual one, in which they do their
thing, we do ours, and everyone's happy.

-s
p.s.: And what do I care if I look like a hypocrite? I'm a human with
a functioning metabolism; it is a safe bet that I am a hypocrite. I don't
see why I should care.
--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!


Seebs
  Reply With Quote
Old 11-07-2009, 12:26 PM   #240
bartc
 
Posts: n/a
Default Re: How to convert Infix notation to postfix notation
"Nick Keighley" <> wrote in message
news:c46081d3-c7d9-4e9d-bc0e-...
> On 5 Nov, 12:18, "bartc" <ba...@freeuk.com> wrote:
>> "Richard Heathfield" <r...@see.sig.invalid> wrote in message
>> news:...
>> > <f6731d50-9f4d-45c8-b0ea-d7b212b8f...@f20g2000prn.googlegroups.com>,
>> > spinoza1111 wrote:

>


>> >> Grow up. Most platforms are Microsoft.

>>
>> > Absolute rubbish. If you're going by installation count, there are
>> > approximately 1,000,000,000 PCs out there, not all of which run MS
>> > operating systems. [lots of examples]

>
> <snip>
>
>> I keep hearing all this. But since the 80's, most of the computers I've
>> been
>> able to buy have come with a MS operating system. Most of the rest have
>> been
>> Macs.

>
> You probably haven't bought many articulated lorries either but they
> still exist.


That's a good analogy, but it helps make my point not yours: when someone
takes driving lessons, do they also include sections on HGV and PSV driving?
[Ie. trucks and buses]

>> There are also a number of products which might have microprocessors
>> inside
>> but are not primarily computers (easy to tell when they contain any
>> programmable devices, because they take ages to power up, are
>> temperamental,
>> slow, unresponsive, and half the time don't work; it seems not only MS
>> are
>> capable of writing crappy software).

>
> Some things like MP2 players, digital cameras and GSM phones can't be
> built without microprocessors.


I'm not saying otherwise (although you will note that recorded music,
photography, and telephones used to work just fine without them...)

>> Regarding C, some development will be targeted at MS/PC platforms, the
>> rest
>> at everything else.
>>
>> I don't know what the mix is (counting developers, not numbers of
>> end-products), but I'd say the MS/PC lot are still a sizeable chunk;

>
> agreed
>
>
>> they
>> would welcome that book that was mentioned and there's no real reason for
>> them to care whether their product runs on anything else.

>
> personnally I'd prefer a book that clearly distinguised standard stuff
> from non-standard stuff. Some of us like to write software that runs
> on multiple platforms. That 3/4 million line program has been ported
> between OSs once and between DBMSs another.


OK, there's a huge amount of different kinds of computing that goes on in
academia, industry, business and so on.

For those of us outside that world, who only really have access to
consumer-level PCs, why should we concern ourselves with anything else? At
most we might worry about portability between Windows, MacOS and Linux.

And even someone who in their day job writes code for some jet fighter, who
in their spare time wants to exchange programs with a friend who writes
programs for a supermarket, what common platform do you think they might
use?

--
Bartc



bartc
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Rip DVD and Convert Video on Mac OS dave345 Media 12 07-07-2008 09:32 AM
Need help on Modelsim VHDL syntax? ASAP:) kaji General Help Related Topics 0 03-14-2007 10:43 PM
Need help on a Modelsim VHDL Syntax? ASAP:) kaji Software 0 03-14-2007 10:43 PM
Need Help on a Modelsim VHDL Syntax....ASAP:) kaji Hardware 0 03-14-2007 10:41 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46