Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
In Pascal (at least in the version as intended by Go^H^HWirth), you are not very likely to make that mistake. Pascal uses = to compare two values, and := for assignment. So, you'd have to type an extra character (instead of leaving one off) to make this mistake, but even if you do:
if a := b then begin ... end
is a compile time error. Not really a problem. In Perl using assignment instead of comparison in a condition leads to a compile time warning. However, in C, the use of assignment instead of comparison is just find, and only some compilers will warn, if you turn on the appriate warnings. But when compiling C, it's much more common (and troublesome) to turn warnings on than in Perl.

Conclusing, when coding in Perl, and certainly in C, is more likely to make this mistake than when coding in Pascal.

Abigail


In reply to Re: eq vs. == by Abigail-II
in thread eq vs. == by c

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found