Linux-Advocacy Digest #919, Volume #27           Mon, 24 Jul 00 18:13:07 EDT

Contents:
  Re: Just curious, how do I do this in Windows? (The Ghost In The Machine)
  Re: What I've always said: Netcraft numbers of full of it (abraxas)
  Re: Just curious, how do I do this in Windows? ("Drestin Black")
  Re: Just curious, how do I do this in Windows? ("Drestin Black")
  Re: Some Miserable weekend with Windows :( ("Paul Bary")
  Re: The Failure of the USS Yorktown (Woofbert)
  Re: Just curious, how do I do this in Windows? ("Drestin Black")
  Re: Just curious, how do I do this in Windows? ("Drestin Black")
  Re: Tinman digest, volume 2451750 (Davie Tholen) ([EMAIL PROTECTED])
  Re: Just curious, how do I do this in Windows? (David Steinberg)
  Re: Just curious, how do I do this in Windows? ("Drestin Black")
  Re: Just curious, how do I do this in Windows? ("Drestin Black")

----------------------------------------------------------------------------

From: [EMAIL PROTECTED] (The Ghost In The Machine)
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: Mon, 24 Jul 2000 21:29:58 GMT

In comp.os.linux.advocacy, T. Max Devlin
<[EMAIL PROTECTED]>
 wrote
on Mon, 24 Jul 2000 00:07:31 -0400
<[EMAIL PROTECTED]>:
>Said The Ghost In The Machine in comp.os.linux.advocacy; 
>   [...]
>>>This is my understanding of Big Endian and Little Endian:
>>>
>>>"On an Intel computer, the little end is stored first. This means a Hex word
>>>like 0x1234 is stored in memory as (0x34 0x12). The little end, or lower
>>>end, is stored first. The same is true for a four-byte value; for example,
>>>0x12345678 would be stored as (0x78 0x56 0x34 0x12). "Big End In" does this
>>>in the reverse fashion, so 0x1234 would be stored as (0x12 0x34) in memory.
>>>"
>>>
>>>So, I took it to mean inputting: 0x12345678 I should output: 0x78563412 -
>>>and so on.
>>
>>You are more or less correct in that understanding.  VAXen,
>>for example, were also little endian; HPs and Suns, however,
>>are big endian.  (Gave us fits at my prior employer some years
>>back, when we first ported from Apollo, Sun, and HP, all of which
>>were big endian, to NT on ix86, which was little endian.)
>
>For those less well endowed programmatically, could I point out, purely
>for consistencies sake, that Mr. Black's (if I have the attributes
>right) "or lower end", is a minor problem for me, personally?  I believe
>the better term, by being conventional, which is to say almost universal
>throughout the technical sciences, is "least significant digit".

Except that "digit" refers to base ten. :-)

>
>I will leave it for those more classically educated than I to determine
>if Mr. Black's presentation indicates he is notably ignorant of the
>term, which is quite 'significant', if I might say, to the issue at
>hand.
>
>>>
>>>So... hows this?
>>
>>[terrible programming example using BASIC strings snipped]
>
>Please.  Visual Basic strings.  Could I beg your indulgence in allowing
>that BASIC, as contrasted quite definitely to 'Visual Basic', is a
>language (I am begging indulgence, please remember) that should not be
>confused with Microsoft's pseudo-development environment monstrosity?
>Even if the string manipulations would have worked in a classic BASIC
>environment, Drestin's use of them for 'endian' manipulations are so
>problematic that even a BASIC 'programmer' should not contemplate them.

Hm...I'll be more careful of that in the future.  I know too
many BASICs as it is:  HP 21xx (that one's OLD), Apple ][,
Apple ][+/ ///, the built-in IBM Basic, GWBasic, ABasic,
and AmigaBasic.

One of the few I don't know is Visual Basic.

>
>>Ye gods; strings to do endianity flips?  Try this one:
>>
>>      long endianFlip(long inp)
>>      {union
>>              {long l;char c[sizeof(long)];} u;int i, j;
>>                      for(i=0, j=sizeof(long)-1; i>j; i++,j--)
>>              {t = u.c[i]; u.c[i] = u.c[j]; u.c[j] = t;}
>>>             return u.l;}
>
>Could you check my editing?  And is the "(long)-" a 'one', or an 'l'?

What did you do to my poor union?  :-)

Yes, it's a "one", not an "ell".

>
>Christ, I might as well ask for a programming tutorial, and hope that
>someone is willing to explain what "++" means.  Would it help if I
>mentioned that I can probably figure out "--", if the explanation is
>really patient?

If one has a variable, the '++' operator, which can either be prefix
or postfix, increments that subexpression at some point.  If the '++' is
prefix, the value of the expression is the result after increment;
if postfix, the value is before the increment.  If the value is ignored,
all it does is increment the subexpression.

Therefore, things like this:

        int i;
        for(i=0;i<10;i++)
        {
                ...
        }

work as expected.  Sorry if I was being overly cryptic, but I was
in a bit of a hurry. :-)

One can also do things like:

        if(success)
                optimes[ixtime++] = curtime - starttime;

which puts the result of the subtraction into optimes[ixtime],
*then* increments ixtime.

Be careful of expressions such as a[i++] = i++.

>
>>Or, if you prefer, try this one:
>>
>>      #include <limits.h>
>>      long endianFlip(long inp)
>>      {long mask = ((1<<CHAR_BIT)-1);long ret = 0;    int i;
>>              for(i=0;i<sizeof(long);i++)
>>              {ret <<= CHAR_BIT;ret |= (mask & inp);inp >>= CHAR_BIT;}
>>              return ret;}
>>
>>(CHAR_BIT is a system-dependent constant that is the number of
>>bits in a char.  Nowadays it's almost always 8, but using
>>Magic Numbers(tm) in one's code is almost always a Bad Thing(tm). :-) )
>
>I don't think you can trademark either of those; they're both in the
>Jargon File.  Sorry.

Oh pooh. :-)

>
>But I thought "nowadays", it would be 32 or even 64!  What gives?

CHAR_BIT has nothing to do with the number of bits in a wide
or Unicode character.

>
>>I'm not sure which one would be faster or is cleaner, but both would
>>beat your string handler.
>
>Trying to figure things out from your examples, it occurs to me that
>I've never quite really *grasped* the semicolon, ';' in code.  It seems
>to be an *ending*, not just a delimiter.  An "execute" command, maybe?

The semicolon in Pascal is a separator.  That is to say, one can omit
it in certain contexts (and, if the Pascal dialect doesn't support
empty statements, one *must* omit it -- however, I think the Pascal
standard requires empty statements).   For example:

        program squares;
        var
                i, i2: integer;

        begin
                for i := 1 to 10
                do
                begin
                        i2 := i * i;
                        writeln('i = ' , i , ' and i2 = ', i2)
                end
        end.

is a perfectly legitimate Pascal program.  Note that the writeln
and the end do not have (or need) semicolons; the semicolon is only
needed to separate statements in a statement list (such as the i2
assignment just above the writeln).

By contrast, the semicolon in C is a statement terminator; it
is required to use it, for simple statements:

        int main()
        {
                int i, i2;

                for(i=1;i<=10;i++)
                {
                        i2 = i*i;
                        printf("i = %d and i2 = %d\n", i, i2);
                }
                return 0;
        }

(note that statement block {} don't require semicolons; however,
if one is defining a struct or a union, the '}' is usually followed
by a semicolon, unless one is also doing a typedef, or a variable
declaration).

>I'm interested in hearing what anyone might have to say on the gestalt
>of this kind of thing.  I've had to work with some C, and a lot of perl
>code, but I don't have the benefit of a formal education.  I don't even
>have (and wouldn't accept, at this point, if offered) Mr. Black's
>background in using VB.  I truly apologize if my intrusion is a bother,
>but I would *like* to be able to cobble together simple programs, and
>I'm not sure if the reason I'm not doing so is because of a lack of
>benefit (given the MS monopoly, but I do have perl) or a lack of
>ability.  I'm not at all good with math.  Mathematics, actually, isn't
>so much a problem as 'arithmetic'.

I am knowledgable in Galois theory, measure theory (Lebesgue integrals),
complexibility theory, some knowledge of compiler building (= I know
how to use flex and byacc :-) ), and a few other things.  However,
whatdo I do most of my work in when debugging or developing?  Chasing
data around!  ("What does this variable hold at this point?")  Or
chasing pointers around ("What does this variable point to?").

The closest I've come to using more than simple math is figuring out
why a large project blew up (turned out to be related to the method
we were using to compute intersections of two lines; we lost a lot
of significant bits and were simply not doing it right).  And
even then, the notion of "number of bits required for this computation"
would have been understood by an algebra-level student.

>But either way, I hope to be able to
>be really *efficient*, which is to say I want to learn the minimal
>amount for maximum capabilities, at scripting and maybe simple source
>code hacking.

Efficient at development, or efficient at runtime?  The two are rather
different problems.

For example, a bubble sort is very easy to code, but very inefficient.
By contrast, something such as a tree sort is more difficult to code,
but more efficient at runtime.

There are also issues with maintenance; ideally, one would write
code that one could understand perfectly after years of neglect,
even if other people have been mucking about in it in the meantime.

Portability occasionally rears its ugly head; if one uses a hack
that works beautifuly in one environment, but uses non-portable
constructs, one might have a problem when requested to port to
another environment, or even on occasion to another language.

>
>So anyway, is the semicolon a "go", rather than a delimiter?  And what
>would you suggest would be the easiest way to use a background in BASIC
>to attack Linux?

BASIC doesn't use semicolons, for starters -- except perhaps as the
start of a comment.  The delimiter in BASIC is a colon (':').
The colon is probably a separator, rather than a terminator; it
certainly isn't required to end a BASIC statement.

In C, the semicolon is definitely a "go", at least for simple
statements (assignments, increments, function calls).  Without
it, the compiler will get confused.  (Note that in both Pascal
and C, the newline is treated like any other whitespace, except
within quoted strings; this means that the above C program could
be written:


        int main() { int i, i2; for(i=1;i<=10;i++) { i2 = i*i;
        printf("i = %d and i2 = %d\n", i, i2); } return 0; }

and it would still compile.)

HTH.

[.sigsnip]

-- 
[EMAIL PROTECTED] -- insert random misquote here

------------------------------

From: [EMAIL PROTECTED] (abraxas)
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: What I've always said: Netcraft numbers of full of it
Date: 24 Jul 2000 21:30:37 GMT

In comp.os.linux.advocacy Drestin Black <[EMAIL PROTECTED]> wrote:

> Gee then, I guess we an believe NOTHING written on the web ... We can print
> summaries of reports but that's meaningless cause, well, cause it's just
> some letters on a screen... means nothing according to bernie. it's
> worthless unless it supports his point of view. I can only tell you that
> Stratus tells me that they sell server with 99.999% uptime guarentees,
> including the OS. That's what they claim and I repeated it. 

You havent been able to show that they actually directly made this claim,
thats the problem, dresden.

> what's the point of this - is it this hard for you to admit that Windows
> 2000, something you obviously have very little exprience with, can be as
> stable and reliable as another OS. 

It can be as stable and reliable as some, but not all other OSes.  

> OSes are written by people, some better
> some worse - your automatic assumtion that since the evil MS empire and it's
> minions created this beast and in the past your experiences with W9x are
> less than 100% in your liking that it's impossible to admit that they could
> have got it right with W2K. That ALL the people reporting perfect uptime
> records must be lying or paid off? 

"perfect uptime records"?  I have a linux machine sitting in my kitchen thats
been up since NT4SP5.  Theres a sparc about 20 feet away from me at the moment
thats been up since before NT4.0 was actually released.  (granted, its not 
a very impressive machine by todays standards, but the uptime is interesting).

Your "perfect uptime records" are more vapor, dresden.  "Perfect uptime record"
doesnt actually MEAN anything---

I guess you think you mean that these machines havent crashed once since the 
last time they were rebooted.

Neat.




=====yttrx


------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:30:51 -0500


"Gary Hallock" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Drestin Black wrote:
>
> > Actually - I never ever have need for this function in BASIC which is
why i
> > was unfamiliar with it so I just jotted out a brute force solution - the
> > first thing to pop to mind. I didn't sit and dwell on it or spend more
than
> > a few seconds to pound out the code. Someone just said "couldn't be done
in
> > VB" - and I did. That's all.
> >
> > Your version from the C version is more efficient.
>
> So I guess you have never written a program that has to send data over a
> network.

Sigh... how on EARTH do you make that silly conclusion from what we're
talking about. Gary, listen and I'll use small words: I just cranked out a
quick solution for a silly problem someone threw out. That's it. Period.
Done.

THIS is the reason whenver someone says: "prove you can program, write a
program" I never take the bait and shouldn't have here. NO MATTER WHAT I
WOULD HAVE WRITTEN it would have resulted in the same type of crap.

Yes, I have written network applications. In fact, the very last large
application I wrote involved a medical transcription package which was fully
network multiuser. So, you have guessed wrong.




------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:36:23 -0500


"T. Max Devlin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Said Drestin Black in comp.os.linux.advocacy;
>    [...]
> >Actually - I never ever have need for this function in BASIC which is why
i
> >was unfamiliar with it so I just jotted out a brute force solution - the
> >first thing to pop to mind. I didn't sit and dwell on it or spend more
than
> >a few seconds to pound out the code. Someone just said "couldn't be done
in
> >VB" - and I did. That's all.
> >
> >Your version from the C version is more efficient.
>
>
> From what I heard, the version in C worked, and yours didn't.

You heard wrong.

>
> I would actually like to make a different comment, though.  Intruding as
> I am (always) in the thread, I happened upon this post and grew quite
> agitated by something you did.

gee, suprise...

>
> If I might point out that your usage of terminology in the first
> sentence of your post is problematic.  You refer to BASIC, a
> scripting-style programming language which proved useful for educational
> purposes, and as a simplistic mechanism for providing a programming
> language-like facility to end users who do not need to program, but
> could benefit from simple application or operating-system level
> scripting.  In the early years of the PC, BASIC was a very useful, if
> not very powerful, tool for non-CS users.  It provided a basic template,
> if you will, for the WordPerfect macro language, as well as the
> subsequent Word Basic, and a wide array of "fourth generation"
> languages, including dBase and the like.

That's one way to summerize it - not all together accurate but close enough.
With plenty of gaps and over simplifications and gross exagerations.

>
> You are not dealing with BASIC.  Microsoft's "Visual Basic" 'programming
> language' has as little to do with BASIC as the WB has to do with Edward
> R. Murrow.

You are wrong. VB has, at it's core, the BASIC langague. I think that every
single statement and function in the very most original BASIC created at
Dartmouth in the year I was born. It's most certainly a superset - a huge
superset - but at it's core it's BASIC.

Do you think current versions of C have *very little* to do with the
original version of C?


>Please don't use the term BASIC in referring to whatever the
> hell you do with Visual Basic.  It will only serve to confuse those not
> familiar with either, and leads to unfortunate encouragement of
> cluelessness.

Please refrain from making any more ignorant self-centered and very
presuming posts like these as it provides absolutely no information of use
to this thread and is insulting and boring to those that know much more
about programming. ESPECIALLY coming from someone who is a self-admitted
non-programmer. Go away troll.




------------------------------

From: "Paul Bary" <[EMAIL PROTECTED]>
Subject: Re: Some Miserable weekend with Windows :(
Date: Mon, 24 Jul 2000 15:36:37 -0600

Oh, for starters, reading through the howto which when printed out was a
stack of papers 'bout an inch thick...
Really, I'm glad you enjoy your setup, for me, mine is preferable....

"Bob Hauck" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On Mon, 24 Jul 2000 14:31:44 -0600, Paul Bary <[EMAIL PROTECTED]> wrote:
>
> >yeah I know, I used a linux box as a nat router for awhile. I used
> >pmfirewall as quite honestly, the amount of background work necessary
> >for me to do it manually wasn't worth the effort
>
> What "background work"?  I set mine up and it just runs.  It does not
> need any tending.  Running no services on the box greatly reduces the
> overhead of keeping up with security updates and the like.
>
> --
>  -| Bob Hauck
>  -| Codem Systems, Inc.
>  -| http://www.codem.com/




====== Posted via Newsfeeds.Com, Uncensored Usenet News ======
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
=======  Over 80,000 Newsgroups = 16 Different Servers! ======

------------------------------

From: Woofbert <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: The Failure of the USS Yorktown
Date: Mon, 24 Jul 2000 21:37:09 GMT

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
wrote:

> On 22 Jul 2000 03:44:39 GMT, 
>  Loren Petrich, in the persona of <[EMAIL PROTECTED]>,
>  brought forth the following words...:
> 
> >
> >     I wonder if anyone has tried to collect a list of military follies.

In the early 1900s the US Cavalry was given the sole authority over 
development of the mobile armored cannon platform -- the tank -- but was 
more interested in the glory and tradition of mounted horsemen. Besides, 
the US Army Corps of Engineers listed strict limits on the weight and 
size of vehicles that could cross their bridges, and those limits did 
not allow for big heavy things like tanks. 

The Germans didn't agree with the US analysis of the effectiveness of 
tanks, and developed a couple of different Panzers ... which are the 
basis of the current Israeli design. The Sherman, with its flat front 
end, was years behind German design. 

Lessons learned: Never put any particular technology in the exclusive 
hands of any one branch of the military. Never allow an existing support 
service to limit what R&D can come up with. Never believe what someone 
else says can't be done or isn't worthwhile doing.

-- 
Woofbert <woofbert at infernosoft dot com>, Datadroid
Infernosoft: Putting the No in Innovation. http://www.infernosoft.com
Consider God's handiwork: for who can make straight 
that which He hath made crooked?" Ecclesiastes 7:13

------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:39:07 -0500


"T. Max Devlin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Said abraxas in comp.os.linux.advocacy;
> >In comp.os.linux.advocacy Drestin Black <[EMAIL PROTECTED]>
wrote:
> >>
> >> "The Ghost In The Machine" <[EMAIL PROTECTED]> wrote in
> >> message news:[EMAIL PROTECTED]...
> >> <snip>
> >>> Ye gods; strings to do endianity flips?  Try this one:
> >>
> >>> I'm not sure which one would be faster or is cleaner, but both would
> >>> beat your string handler.
> >>
> >> Ghost and everyone else -  HONESTLY! I wasn't trying to win an award or
make
> >> the singular most efficient function. I looked at it, and hammered out
the
> >> quickest way I could think of.
> >
> >Then you are a horrible programmer.
> >
> >
> >
> >
> >-----yttrx
>
>
> 'Abraxis', I've been greatly annoyed by your posts, over in
> alt.destroy.microsoft, for some time.  You have never been as horrid as
> Roger or some others, and were always pretty *incisive* in your
> comments, if incorrect, in the context of the discussion.
>
> But I just want to say that we have common ground.  Because I completely
> agree with your assessment of the matter here.
>
> I don't even think it matters which part of Mr. Black's communication
> evinced the "then" which preceded your comment.  It could have been that
> he actually used a string function for byte-level manipulation.  It
> could have been that he didn't try to make the singular most efficient
> function.  I might even have been that he hammered out the quickest way
> he could think of, rather than dealing with the challenge
> intellectually.  It doesn't even matter; you are right, as far as I'm
> concerned.  Accurate.  Consistent.  And practical.
>
> Then he is a horrible programmer.
>
> Thanks for your time.  Hope it helps.
>

Max - if you really want to sleep with him, you don't have to butter his
buns so much - I'm sure you two can masterbate in your "anti-Drestin" easily
without having to heap so much techobabble praise upon him - especially in
light of the fact that both of you are non-programmers and haven't a clue
what you are talking about. You are so desperate to formulate an insult that
you don't even realize how stupid you make yourselves sound by endulging in
this circle jerk. I mean... really... get a room girls...




------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:40:19 -0500


"Donovan Rebbechi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> On 22 Jul 2000 19:50:04 -0500, Drestin Black wrote:
>
> >Anyway, yes, string for math - lame to be sure, but, I never do endian
> >operations, ever.
>
> You need endian operations when (a) you write code that's portable across
> hardware architectures which means that (b) networking code tends to
> require endian operations. You should get out more.

Donovan - shame on you.

I write for the Windows OS - I have no need to be concerned with Endian
operations.



------------------------------

Crossposted-To: 
comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.os.ms-windows.nt.advocacy
From: [EMAIL PROTECTED]
Subject: Re: Tinman digest, volume 2451750 (Davie Tholen)
Reply-To: [EMAIL PROTECTED]
Date: Mon, 24 Jul 2000 21:48:04 GMT

Karl Knechtel writes:

> Ah, a beautiful day for a relaxing round of Tholen emulation...

Then why didn't you do so, Karl?


------------------------------

From: [EMAIL PROTECTED] (David Steinberg)
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 21:49:44 GMT

Aaron R. Kulkis ([EMAIL PROTECTED]) wrote:
: More to the point, he thinks that string-variables are an appropriate
: solution for binary data.

And if that doesn't give him away as a non-educated, non-programmer, I
don't know what does.

When I was 12 years old and programming in QuickBasic, I knew that
non-strings were for numbers and strings were for anything that had
letters or other symbols.  And that's all I knew about the difference.  I
would say Drestin might be at about this level.

In first year, I was taught what a string actually is, how it is actually
represented.  As a result, I would never consider using strings to do a
endian-swap.  The thought of using, say, 9 bytes of characters to 
represent what could be stored in one 32-bit word is so obviously wrong
that it wouldn't even cross my mind.

Also, having the notion of "shifting" close-by, which comes from the use
of both Assembly languages and a lower-level HLL like C, makes the
reasonable solution obvious.  Since most people don't spend all day
doing "bit twiddling," it's natural that finding the exact solution
(thinking about the correct bitmask and shift directions) might take a few
minutes.

Of course, Drestin has tried to justify his solution by saying that he
wasn't going for the best solution, he just wrote down the first thing
that came to mind.  In fact, that's what's so telling: because his first
thought was to use strings, we can conclude that Drestin doesn't really
understand how computers work.

He calls himself a programmer because he knows how to click around in the
VB IDE.  And then, he tells us about his preferences in programming
languages, as if we should care.  Obviously, he doesn't know any
"real" languages, and he doesn't even understand how computers work.  What
is he basing his opinions on, anyway?

I wouldn't want a mechanic who doesn't know how a car works.  Why would
I want a "programmer" who doesn't know how a computer works?

--
David Steinberg                             -o)
Computer Engineering Undergrad, UBC         / \
[EMAIL PROTECTED]                _\_v

------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:51:38 -0500


"Aaron R. Kulkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
>
> Drestin Black wrote:
> >
> > <[EMAIL PROTECTED]> wrote in message
> > news:8l8l8t$3j9$[EMAIL PROTECTED]...
> > > "Drestin Black" <[EMAIL PROTECTED]> writes:
> > >
> > > >This is my understanding of Big Endian and Little Endian:
> > > [...]
> > > >So, I took it to mean inputting: 0x12345678 I should output:
0x78563412 -
> > > >and so on.
> > >
> > > >FUNCTION EndianFlip (Value)
> > >
> > > >Temp$ = HEX$(Value)
> > > >IF LEN(Temp$) MOD 2 THEN Temp$ = "0" + Temp$
> > >
> > > >Bytes = LEN(Temp$) \ 2
> > > >FOR X = 1 TO Bytes
> > > >   Build$ = MID$(Temp$, (X - 1) * 2 + 1, 2) + Build$
> > > >NEXT
> > > >EndianFlip = VAL("&H" + Build$)
> > >
> > > >END FUNCTION
> > >
> > > Yikes! If I give you 0x00012345, you'd give me back 0x00452301, which
is
> > > completely wrong. There is a huge difference between something begin
zero
> > > and something being empty, or not existant.
> >
> > Yes, you are right. That was a mistake and easily fixed.
>
> i.e. he admits he didn't test his work.

I did test my work, I just didn't test this particular condition during the
few minutes it took to code this out on the fly.

The original code was WRONG too - in case you missed that too.

Also, let's see YOU write a BASIC function that performs endianflip on any
sized number.... hmmmm? You claim to be a programmer, this should be simple,
especially in BASIC which you seem to think is for the brain dead. So show
us you are not brain dead and lets see your version of this function? Please
try not to copy from the web search you are doing now...



------------------------------

From: "Drestin Black" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.ms-windows.nt.advocacy
Subject: Re: Just curious, how do I do this in Windows?
Date: 24 Jul 2000 16:53:03 -0500


"T. Max Devlin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Said Aaron R. Kulkis in comp.os.linux.advocacy;
>    [...]
> >You can't even be bothered to test a simple 10-line program, and
> >yet, you expect us to believe your other exhortations?
> >
> >Come now, we're not nearly as stupid as you, punk.
>
> Well, that's true, but he was providing a quick-and-dirty example of a
> concept, and his code illustrated the solution.  He might be stupid (and
> I'm anxious to learn more either way), but he is merely a "punk", at
> best, for not actually testing the scratch-code he was using for a
> simple example.  I'd like to hear a more telling argument confronting
> his other exhortations, if you've got one.

Here is one for you - sometimes code has errors in it and sometimes you
don't find it the very first time you test it. And sometimes when the code
is DEFINATELY not critical and simply a quick off the cuff piece of fluff
you don't do detailed testing. And how can I be expected to produce a
correct working version of code when the code I was trying to emulate itself
was wrong and flawed?

At least I'm a programmer - not a programmer wannabe pain in the butt



------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: [EMAIL PROTECTED]

You can send mail to the entire list (and comp.os.linux.advocacy) via:

    Internet: [EMAIL PROTECTED]

Linux may be obtained via one of these FTP sites:
    ftp.funet.fi                                pub/Linux
    tsx-11.mit.edu                              pub/linux
    sunsite.unc.edu                             pub/Linux

End of Linux-Advocacy Digest
******************************

Reply via email to