[6711] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 336 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 21 14:37:20 1997

Date: Mon, 21 Apr 97 11:00:36 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 21 Apr 1997     Volume: 8 Number: 336

Today's topics:
     Re: "Missing Separator" error when making perl5.003 <jet@accessone.com>
     [Q] leading zeroes for a dollar amount (Ben Guerard)
     Re: [Q] leading zeroes for a dollar amount (Eric Bohlman)
     Re: a question on striping characters (Honza Pazdziora)
     How to make an identity check matrix ? <jong@mrc-lmb.cam.ac.uk>
     Re: increment hash not working (Eric D. Friedman)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th <prasadm@not4u.polaroid.com>
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Mark A Harrison)
     Re: Perl -e switch <a.aitken@unl.ac.uk>
     Re: PERL Programmers...Need your opinions (Nathan V. Patwardhan)
     Perl return code <walter.boev@nrc.ca>
     Perl/Cgi script BBurns@Cbclegal.com
     Re: print <<THIS_PART; won't work (Scott)
     Re: print <<THIS_PART; won't work (Honza Pazdziora)
     Re: Redirecting to URL (Mariusz Zydyk)
     Request For Help (Michael Shannon)
     Re: sysopen object method in perl 5.001? <tchrist@mox.perl.com>
     Re: They both suck! (was: Borland or Microsoft compiler <moony@maptel.es>
     Re: They both suck! (was: Borland or Microsoft compiler <guenter@etm.co.at>
     Re: They both suck! (was: Borland or Microsoft compiler (Lawrence Kirby)
     Re: They both suck! (was: Borland or Microsoft compiler (PeteBecker)
     Re: Unix and ease of use  (WAS: Who makes more ...) <tim@a-sis.com>
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Mon, 21 Apr 1997 08:48:18 -0700
From: Eric Thompson <jet@accessone.com>
Subject: Re: "Missing Separator" error when making perl5.003
Message-Id: <Pine.LNX.3.91.970421084328.285A-100000@jet.accessone.com>


I have not been having trouble compiling in the recent past.
The version of perl is 5.0003 , with no other identifier.
My libc was a culprit last year, but now all works well,
excepting this.

What surprised me was that my previous installation of perl went 
exceedingly well (v5.0001l)

I still have that working, in another directory.

Eric


 jet@accessone.com

On Mon, 21 Apr 1997, David Alan Black wrote:

> Hello -
> 
> In comp.lang.perl.misc you write:
> 
> >This is an error message I haven't gotten before from make
> >(gnu make v3.74):
> 
> >makefile:382: *** missing separator.  Stop.
> 
> >Oh, what could that be from?
> 
> >This message generated immediately after invoking make to compile
> >perl5.0003, a freshly downloaded version. Line 382 is one line past end
> >of file. Ran 
> >	sh Configure -des -Dcc=gcc
> >then, poof!
> 
> >Linux v2.07 , 486DX-66, gcc 2.7.2, X  environment.
> 
> The only thing I can think of is maybe something about the version/
> copy of make.  There was some bugginess connected with a libc 
> release last year - basically, a fix in the library exposed a
> bug in GNU make....  But if make works for other builds, then
> that probably isn't the issue.
> 
> What patch level of 5.003 are you trying to build?
> 
> David Black
> dblack@icarus.shu.edu
> 
> 


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

Date: 21 Apr 1997 15:40:53 GMT
From: ben@gbfcu.reno.nv.us (Ben Guerard)
Subject: [Q] leading zeroes for a dollar amount
Message-Id: <5jg1q6$p4i$1@news.greatbasin.net>

Hi,

Small asthetics problem here, folks...

I have an order form script that works fine EXCEPT whenever the cents portion 
of the price ends in a zero (i.e. $6.30) the ouput truncates the trailing zero 
[as one would expect] (i.e. $6.3).  I'd really like to add that zero.  I've 
tried Math::BigFloat, but it's not giving me what I want (not even close).  I 
can make a cheesy workaround, but I'd rather not "force" the zero if I can come 
up with it more gracefully.  Any and all help would be greatly 
appreciated.  Thanks for your time.

 .ben.



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

Date: Mon, 21 Apr 1997 16:41:26 GMT
From: ebohlman@netcom.com (Eric Bohlman)
Subject: Re: [Q] leading zeroes for a dollar amount
Message-Id: <ebohlmanE8zyD3.E01@netcom.com>


Ben Guerard (ben@gbfcu.reno.nv.us) wrote:
: Hi,

: Small asthetics problem here, folks...

: I have an order form script that works fine EXCEPT whenever the cents portion 
: of the price ends in a zero (i.e. $6.30) the ouput truncates the trailing zero 
: [as one would expect] (i.e. $6.3).  I'd really like to add that zero.  I've 
: tried Math::BigFloat, but it's not giving me what I want (not even close).  I 
: can make a cheesy workaround, but I'd rather not "force" the zero if I can come 
: up with it more gracefully.  Any and all help would be greatly 
: appreciated.  Thanks for your time.

Look up "printf" and "sprintf."  They'll easily do what you want to do.



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

Date: Mon, 21 Apr 1997 15:11:59 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: a question on striping characters
Message-Id: <adelton.861635519@aisa.fi.muni.cz>

spanky@direct.ca writes:

> Hi,
> 
> how can you strip the character string, Ex ->  "I_LIKE_THE_NUMBER_9"
> to get just the number 9?
> 
> Thank you for your time.

$string = "I_LIKE_THE_NUMBER_9";
$string =~ s/I_LIKE_THE_NUMBER_//;

or

$string =~ s/^.*(\d)$/$+/;

which really depends on what you expect the program to do.

Hope this helps.

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Mon, 21 Apr 1997 17:48:18 +0100
From: Jong <jong@mrc-lmb.cam.ac.uk>
Subject: How to make an identity check matrix ?
Message-Id: <335B9A52.1CFB@mrc-lmb.cam.ac.uk>

Hi,

I want to make a matrix which is for dynamic programming.
I am sure there must be a very efficient(perly or not)
way to do so.

So, I want to make following matrix with an example sequence

   ACDEFCA



   A C E E F C A
----------------
A  1           1
C    1       1
E      1 1
E        1
F          1 
C    1       1
A  1           1
-----------------

All the identical matches are checked to 1


2D matrix or any data structure which is
efficient will do the storage. I am embarking
on hacking and I always find that other people
have much more efficient ways. It will be a
good education for me.

Thanks a lot,


Cheers,

Jong 


     
-- 
 I support Perl, Linux ...

With OVER SIX MILLION USERS, up from only ten or so a very few years
ago, Linux has taken it's place as the world's #3 computer operating
system overall. And Linux is breathing down the neck of #2 for very good
reasons. If growth rate to date continues, Linux will be the #1 computer
operating system by late '98 or '99. Are YOU ready?

	  ) Linux Newsletter

http://www.smli.com/people/john.ousterhout/scripting.html


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

Date: 21 Apr 1997 06:25:28 GMT
From: friedman@medusa.acs.uci.edu (Eric D. Friedman)
Subject: Re: increment hash not working
Message-Id: <5jf18o$kr5@news.service.uci.edu>

[mailed, posted]

In article <5jemkq$pui$1@news3.microserve.net>,
Geoffrey Hebert <soccer@microserve.net> wrote:
>
>I must be missing something simple. 

Yes, you are.

>My +1 below works first time but not second.
>OK it is my first time with this, but I thought I
>was following the rules.

Apparently not.  If you had read the >free< perl documentation, you
would know that you should always, always use the -w switch to turn
on warnings from the compiler.

consider:

#!/dcs/bin/perl5 -w

my $i;
if ($i = 1) {print "doh!"}

In addition to producing the expected bogus "true" result, the compiler
tells us:
Found = in conditional, should be == at ,f line 4.

Adding 'use diagnostics;' to the code gives even more details:

Found = in conditional, should be == at ,f line 5 (#1)
    (W) You said
    
        if ($foo = 123)
    
    when you meant
    
        if ($foo == 123)
    
    (or something like that).

>while (<SCORE>) {
>   chomp;
>  ($Cdiv, $dt, $hteam, $scoreh, $ateam, $scorea) = split(/:/,$_,6);
>   # add 1 to games played for home team
>   $play{$hteam} = $play{$hteam} + 1;  
>   if ($play{$hteam}=1){    ## second time through this still = 1

Sure enough   ^^^^^^^^^^

That should read if $play{$hteam}== 1.

You might also give some thought to using my on the variables returned
by split: word has it that this yields a speed gain of about 10%
percent.

>email please soccer@microserve.net

If you don't bother to read the documentation or this newsgroup, why
should anyone e-mail you?  

-- 
Eric D. Friedman
friedman@uci.edu


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

Date: Mon, 21 Apr 1997 10:42:41 -0400
From: "M. Prasad" <prasadm@not4u.polaroid.com>
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <335B7CE0.7564@not4u.polaroid.com>

Erik Naggum wrote:
[snip]
> I get the impression that John Ousterhout does not understand what "dynamic typing" means.
[snip] 
> this is getting quite amusing...
[snip]
> this is the most ignorant nonsense I have ever seen anyone who pretends to
> be serious has ever written!  if this is the best John Ousterhout can do
> when he researches something, there's no _wonder_ Tcl is the way it is!
> 
> have you even _seen_ a Common Lisp compiler, John Ousterhout?

How about you stop giving Lisp a bad name with these
tactics of yours?  It gives the impression that
Lisp is only used by fanatics.

(I suggest that other people who do not want to see
this impression continue, should join in an attempt
to squelch this highly errant behavior...)

> again, why should anyone trust your judgment on this?  you are clearly
> unable to recognize the simple fact that you don't know Lisp in practice
> well enough to pass judgment on it.  yet you make a big stink about

Never stopped *you* from making comments about Lisp, now, did it?


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

Date: 21 Apr 1997 15:13:03 GMT
From: mharriso@utdallas.edu (Mark A Harrison)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <5jg060$q3f$1@news.utdallas.edu>

Erik Naggum (erik@naggum.no) wrote:

: the Lisp Machines died for reasons totally unrelated to quality.  actually,
: they died for the same reason that mind-bogglingly inferior systems won.
: the answer is a single word: "marketing".

I don't think this is true...  Lisp machines died because their
functionality was supplanted by other more general purpose machines.

Example: My former roomate (mid-80's) was a chip designer.  He had
two giant systems on his desk, a lisp machine (TI Explorer?) and
an Apollo.  He was always complaining about how inconvenient it
was that part of his work was done on the lisp machine (chip design)
and that the rest was done on the Apollo (word processing, email,
manufacturing apps).  When their software group was able to port
their applications to the same box their other applications ran
on, they dropped the lisp machine without hesitation.

In other words:  Marketing didn't kill lisp machines... Good lisp
environments that ran on general-purpose computers killed
lisp machines.

Mark.


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

Date: Mon, 21 Apr 1997 16:53:33 +0100
From: Alastair Aitken <a.aitken@unl.ac.uk>
Subject: Re: Perl -e switch
Message-Id: <335B8D7C.D7951F8B@unl.ac.uk>

Chris Andrew wrote:

> I wish to use a -e statement where I can pass a *shell variable* as
> argument, *not* a file.

This passes a shell (bourne) environment variable, not a file, to a perl
-e one line script fine.  It's using perl's standard execution method of
stroing the contents of the parent environement in a hash called %ENV.
The values in %ENV are called by their names - in this case ENV_TEST.

#! /bin/sh

ENV_TEST="env_test space"; export ENV_TEST;
perl -e 'print "\n$ENV{ENV_TEST}\n\n"';

Alastair.



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

Date: 21 Apr 1997 14:40:38 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: PERL Programmers...Need your opinions
Message-Id: <5jfu96$r2i@fridge-nf0.shore.net>


Jerry Bradenbaugh (bradenb@ibm.net) wrote:

: As PERL programmers, please tell me what types of programs you write and
: anything else helpful to know in becoming a PERL programmer.

If you have a good grasp of a language, and can express your skills
effectively, you're a programmer.  Pound the pavement - distribute your 
resume *everywhere* - sell yourself.

--
Nathan V. Patwardhan
nvp@shore.net



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

Date: 21 Apr 1997 15:15:59 GMT
From: "Walter Boev" <walter.boev@nrc.ca>
Subject: Perl return code
Message-Id: <01bc4e66$91f95ac0$5d50f684@pc93.cisti.nrc.ca>



Hi all,

I have a general question on Perl return codes.

How does one trap a perl script return code.
The perl script is called from a Korn shell script. When
the perl script finishes it returns an exit code (e.g. exit 7).
The Korn shell script then continues to run. However depending
on the exit status returned by the perl script the Korn shell
script can branch.

Any help would be appreciated.

Thank you.

walter.boev@nrc.ca


---


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

Date: Mon, 21 Apr 1997 11:34:05 -0600
From: BBurns@Cbclegal.com
Subject: Perl/Cgi script
Message-Id: <861636515.19531@dejanews.com>

Why does my webserver eventually slow down since the addition of CGI
scripting (mainly multiple counter programs)???  The counters are Perl
executables.  The webserver is an Alpha 166, Nt 3.51 workstation,
Netscape Comm. Svr.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet


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

Date: Mon, 21 Apr 1997 13:57:14 GMT
From: seligman@netcom.com (Scott)
Subject: Re: print <<THIS_PART; won't work
Message-Id: <seligmanE8zqrE.8Ar@netcom.com>

In article <335b6775.762377@news.mindspring.com>,
Ken Ledbetter <ledheadx@mindspring.com> wrote:
> I'm getting an error 500, malformed header.  I'm sure there is no
> white space after STOP and I tried to use:
> 
> print <<'STOP';

That's becuase you didn't give it a header.

print <<STOP;
Content-type: text/html

<your html stuff here>
STOP

Should work for you.

-- 
-- Scott Seligman                    will hack perl for computer parts
-- email: seligman@netcom.com


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

Date: Mon, 21 Apr 1997 15:38:51 GMT
From: adelton@fi.muni.cz (Honza Pazdziora)
Subject: Re: print <<THIS_PART; won't work
Message-Id: <adelton.861637131@aisa.fi.muni.cz>

ledheadx@mindspring.com (Ken Ledbetter) writes:

> I'm trying to do something like this
> 
> print <<STOP;
> 
>    <html><body>
>    HI
>    </body></html>
> STOP
> 
> but it won't work, any help?

Strange, it works for rather well. What does it say? Does it say
anything? What does perl -w and use strict say. What's your perl
version?

--
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
                   I can take or leave it if I please
------------------------------------------------------------------------


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

Date: Mon, 21 Apr 1997 07:08:07 GMT
From: pod@null.net (Mariusz Zydyk)
Subject: Re: Redirecting to URL
Message-Id: <335b1215.495365@news>

On Mon, 21 Apr 1997 05:10:54 GMT, niksun@lconn.net (Niksun) wrote:
[>I know the format to direct the user to a URL in Perl is:
[>
[>	print "Location: xxxxxxx.com\n";
[>
[>But, let's say I have already printed some text in the browser window:
[>
[>	print "Content-type: text/html\n\n";
[>	print "blahblahblah\n";
[>
[>How can I direct the user to a URL after doing this?  I tried the same
[>command as my first example, but it simply prints this in the browser
[>window instead of redirecting the user (because I already set the MIME
[>type to text/html).  Any ideas?  Please e-mail me.

------- If you know what the page is you will be redirecting to in
advance, you can put it in a META tag in the head section of the
page. Just set a delay big enough to let the rest of the page to
download (and be read if this is what you want).
--
 Mariusz Zydyk                           http://www.ucalgary.ca/~mszydyk/
 Prince of Darkness                                          pod@null.net


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

Date: Mon, 21 Apr 1997 10:19:25 -0600
From: datamike@interaccess.com (Michael Shannon)
Subject: Request For Help
Message-Id: <19970421101925281867@d154.w.interaccess.com>



I am a PERL novice writing my first program. Thanks to much help from
the
net I've gotten fairly far. However, I've hit another stumbling block
perhaps some of you more experienced programmers can help me with.

I am writing a program to generate a report based on a text file. The
program so far follows below:

#!/usr/bin/perl -w

while (<>) {

       if (/XB\d/) {

       @words = split(/,/);
       @time = split(/\s/,$words[0]);
       $carrier = $words[7];
       $boxtype = $words[15];

       @hh = split(/:/,$time[1],2);
       $hh = $hh[0];

       $count{$hh,$boxtype,$carrier}++;
}
}

       foreach (sort keys %count) {
               ($hh,$boxtype,$carrier) = split (/$;/);
       write;
       }
       format STDOUT_TOP =
                       Itasca Location
               Order and Shipment Release by Hour
 .
       format STDOUT =
       @<<              @<<<<<<<<               @>>>>   @<<
       $hh,$carrier,$count{$_},$boxtype
 .
This works fine and produces the following when run against the text
file:

        09               ZONE1&5C                   12   SP
        09               ZONE1&5G                    3   SP
        09               ZONE1&5H                    1   SP
        09               ZONE1&5I                    1   SP
        09               ZONE1&5J                   12   SP
        09               ZONE2A                      4   SP
        09               ZONE2F                      1   SP
        09               ZONE1&5C                   12   OV
        09               ZONE1&5G                    3   OV
        09               ZONE1&5H                    1   OV
        09               ZONE1&5I                    1   OV
        09               ZONE1&5J                   12   OV
        09               ZONE2A                      4   OV
        09               ZONE2F                      1   OV
        10               APPLETON                    6   SP
        10               FALMAD                     14   SP
        10               FTWAYNE                     2   SP
        10               HOLREL                      2   SP
        10               INDYPOOL                   29   SP
        10               IOWA                       11   SP
        10               LANREL                     26   SP

The problem is that my boss doesn't like the format. He wants the number
of
ov and sp boxes on one line for each carrier for each hour. He wants it
this way:

Hour Released          Carrier    Bin boxes(ov)          Bulk Boxes(sp)

08:00               LANREL        110                    541
08:00               IOWA          101                    257

Hour 08:00 Totals                 211                    789

#This goes on for every hour that there are records for. Then there is a
grand total at the end:

Final Totals                      689                    1145

How the hell can I
do this!?! I am lost and would really appreciate any help you could
offer.

Thanks!
Michael

Thanks to the people who responded. Unfortunately, I still can't get it
to
work even after spending several more hours at it.


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

Date: 21 Apr 1997 15:21:30 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: sysopen object method in perl 5.001?
Message-Id: <5jg0lq$lb4$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    he@aspen.pprd.abbott.com (Ye He) writes:
:I need to use a real C open (to create a file with the appropriate 
:permission bits, etc), and the O'Reilly Perl book 2nd edition that
:covers perl 5 recommends sysopen.
:
:I have:
:
:use FileHandle;
:...
:
:sysopen MAILLOCK, $M_LOCK, O_WRONLY|O_CREATE|O_EXCL, 0444;
:...
:
:
:When running the script, I got:
:
:Can't locate object method "sysopen" via package "FileHandle" at email.pl line 161.
:
:I'm using perl 5.001, and the FileHandle.pm file does exist in my perl lib.
:Could someone give me a pointer? I couldn't find it in the faq. Thanks much.
:Please email me.

You didn't really type:

    sysopen MAILLOCK, $M_LOCK, O_WRONLY|O_CREATE|O_EXCL, 0444;

you typed

    sysopen MAILLOCK  $M_LOCK, O_WRONLY|O_CREATE|O_EXCL, 0444;
		    ^			       ^
		    ^ no comma		       ^
					       ^ extra e

BTW, you have other bugs there.    Do this:

    #!/usr/bin/perl -w

    use Fcntl;		# for O_ stuff
    use strict;		# to find typos

    my $M_LOCK = "file";

    sysopen MAILLOCK, $M_LOCK, O_WRONLY|O_CREAT|O_EXCL, 0644;

Anyway, didn't anyone every tell you that it's a lousy idea to use
the existence of a file as a lock?  it doesn't work over nfs,
and it often fails for the superuser.  and creating it read only
with a write only mask is subclever.  make sure you put host and pid
in the file if you cannot be convinced to stop using this lousy way.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com

    I dunno, I dream in Perl sometimes...
                    --Larry Wall in  <8538@jpl-devvax.JPL.NASA.GOV>


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

Date: 19 Apr 1997 09:37:02 GMT
From: Santiago Mediodia <moony@maptel.es>
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <5ja3nu$9as$1@diana.ibernet.es>

Da Borg <vla_di_mip@uniserve.com> escrituras: > [.............]
> > >       My company is planning to start a project.  We have a big question
> > > about our investments.  We don't know if we should use Microsoft
> > > compiler or Borland.  Some myth we heard over the net.
> > >
> > > 1) 90% of the programmer uses Microsoft Compiler.
> > > 2) Borland will vanish in 2 years (NASDAQ:BORL)
> > > 3) Borland has better compiler
> > > 4) 99% of the College in US have/use Borland Compiler.
> > >
> > > Some one show us the way?
> 
I cant understand why is people still using Microsoft or Borland to 
make projects. Just, if I see the size of an integer in my Pentium with
Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
the size of the data bus? Something is wrong 'cause Linux gives me 4 bytes
so 32 bits, and thats really the size of the data bus in a Pentium...

Another one, Borland gives me restrictions when i ask for memory. Only 64
k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter

Another one. Linux is free so, very cheap, Microsoft or Borland ....





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

Date: Mon, 21 Apr 1997 14:23:20 +0100
From: Guenter Szolderits <guenter@etm.co.at>
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <335B5C38.49E4@etm.co.at>

Santiago Mediodia wrote:
> 
> I cant understand why is people still using Microsoft or Borland to
> make projects. Just, if I see the size of an integer in my Pentium with
> Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
> the size of the data bus? Something is wrong 'cause Linux gives me 4 bytes
> so 32 bits, and thats really the size of the data bus in a Pentium...

Hey, when have you last visited planet earth?

If you use a 16 bit compiler on DOS, an integer will be 2 bytes long.
Try it on Windows 95, Windows NT or even DOS with a 32 bit compiler and
DOS extender. You will get 4 bytes for an int. Same as with Linux.

> 
> Another one, Borland gives me restrictions when i ask for memory. Only 64
> k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter
> 

Not Borland has the restrictions, but DOS. And it depends on the memory
model used ...


> Another one. Linux is free so, very cheap, Microsoft or Borland ....

Yep.

Guenter


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

Date: Mon, 21 Apr 97 13:34:08 GMT
From: fred@genesis.demon.co.uk (Lawrence Kirby)
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <861629648snz@genesis.demon.co.uk>

In article <5ja3nu$9as$1@diana.ibernet.es>
           moony@maptel.es "Santiago Mediodia" writes:

>Da Borg <vla_di_mip@uniserve.com> escrituras: > [.............]
>> > >       My company is planning to start a project.  We have a big question
>> > > about our investments.  We don't know if we should use Microsoft
>> > > compiler or Borland.  Some myth we heard over the net.
>> > >
>> > > 1) 90% of the programmer uses Microsoft Compiler.
>> > > 2) Borland will vanish in 2 years (NASDAQ:BORL)
>> > > 3) Borland has better compiler
>> > > 4) 99% of the College in US have/use Borland Compiler.
>> > >
>> > > Some one show us the way?
>> 
>I cant understand why is people still using Microsoft or Borland to 
>make projects. Just, if I see the size of an integer in my Pentium with
>Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer , the
>the size of the data bus?

In general, no it isn't. The compiler will usually pick the most efficient
size for int subject to it being at least 16 bits wide (because the
standard requires an int to be able to represent all integers in the range
-32767 to 32767). It often corresponds to the register size on the
target archetecture.

>Something is wrong 'cause Linux gives me 4 bytes
>so 32 bits, and thats really the size of the data bus in a Pentium...

The Pentium has a 64 bit data bus. The 80386DX (and 486) data bus is 32 bit
however.

-- 
-----------------------------------------
Lawrence Kirby | fred@genesis.demon.co.uk
Wilts, England | 70734.126@compuserve.com
-----------------------------------------



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

Date: 21 Apr 1997 16:28:04 GMT
From: petebecker@aol.com (PeteBecker)
Subject: Re: They both suck! (was: Borland or Microsoft compilers ?)
Message-Id: <19970421162700.MAA23738@ladder01.news.aol.com>

In article <5ja3nu$9as$1@diana.ibernet.es>, Santiago Mediodia
<moony@maptel.es> writes:

>I cant understand why is people still using Microsoft or Borland to 
>make projects. Just, if I see the size of an integer in my Pentium with
>Borland, it gives me 2 bytes so 16 bits, and isnt the size of the integer
,
>the
>the size of the data bus? Something is wrong 'cause Linux gives me 4
bytes
>so 32 bits, and thats really the size of the data bus in a Pentium...

The C language definition says that the size of an int is determined by
the implementor, and suggests that it be the "natural size" on the
platform. If you're running under DOS or Windows 3.1 you're in a 16-bit
world: the processor handles 16-bit integral values easily, and requires
more work for 32-bit integers, so all compilers that I know of use 16-bit
integers with these operating systems. If you move to Windows '95 or NT,
or OS/2, or Linux, the system runs the processor in 32-bit mode, and
integers are more naturally sized to 32 bits. All compilers that I know of
(including Borland and Microsoft) use 32- bit integers on these platforms
(except that neither Borland nor Microsoft provides compilers for Linux,
and Microsoft also does not support OS/2).

>
>Another one, Borland gives me restrictions when i ask for memory. Only 64
>k I think, but not it linux, you can ask for 1, 2 Megas, it doesnt matter

Once again, this is a difference in the operating system which is, in
turn, reflected in the compiler. When you produce applications for a
32-bit operating system Borland permits "1, 2 Megas, it doesn't matter."

>
>Another one. Linux is free so, very cheap, Microsoft or Borland ....
>



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

Date: 21 Apr 1997 14:13:30 GMT
From: "Tim Behrendsen" <tim@a-sis.com>
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <01bc4e5d$af5c0620$87ee6fce@timpent.a-sis.com>

Graham C. Hughes <graham.hughes@resnet.ucsb.edu> wrote in article
<87lo6gozgc.fsf@A-abe.resnet.ucsb.edu>...
> -----BEGIN PGP SIGNED MESSAGE-----
> 
> >>>>> "Tim" == Tim Behrendsen <tim@a-sis.com> writes:
> 
> Tim> Well, hard to measure these things of course, but let's say above
> Tim> the 100K-200K lines of code range.
> 
> OK, how about a Linux kernel?  *I* find it hugely useful, letting me
> program and do just about anything I damn well please; I get TeX, I
> get a good C++ compiler, I get vast abilities to munge text (most of
> what I do).  Others use them to run ISPs, servers, firewalls, almost
> everything.  It has full TCP/IP support, IPX, security, quotas,
> accounting, whatever.

Yes, good example.  And is more evidence for my point, of course.
Linux is far, far from the best Unix, for any price.  An excellent
product, but far from the best.  (some say it's not even the best
*free* Unix).

-- 
==========================================================================
| Tim Behrendsen (tim@a-sis.com)        | http://www.cerfnet.com/~timb   |
| "Judge all, and be prepared to be judged by all."                      |
==========================================================================


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 336
*************************************

home help back first fref pref prev next nref lref last post