473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Triple Equals ===


Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?

Just curious; only played with it, not used it a lot yet; thought I'd
see what you guys thought of it first.

TIA,

Twayne
Jul 28 '08 #1
4 1570
Twayne wrote:
Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?

Just curious; only played with it, not used it a lot yet; thought I'd
see what you guys thought of it first.

TIA,

Twayne
It will produce an E_NOTICE if the variable is not set.

That's why there is isset().

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jul 28 '08 #2
..oO(Twayne)
>Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?
'===' is the same as '==', but also performs a type check. Using it on
a non-existing variable will still cause an E_NOTICE error (check your
error_reporting if necessary, make sure it's set to E_ALL or even
E_ALL|E_STRICT).

Micha
Jul 28 '08 #3
Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?

Just curious; only played with it, not used it a lot yet; thought I'd
see what you guys thought of it first.

TIA,

Twayne
Thank you both; the devil is always in the details<g>. E_STRICT is news
to me for some reason; I'll go check what it's about asap.

Thanks much,

Twayne
Jul 28 '08 #4
Twayne schreef:
>Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?

Just curious; only played with it, not used it a lot yet; thought I'd
see what you guys thought of it first.

TIA,

Twayne

Thank you both; the devil is always in the details<g>. E_STRICT is news
to me for some reason; I'll go check what it's about asap.
E_STRICT is also relatively new to the language. ;-)

Regards,
Erwin Moller
>
Thanks much,

Twayne

Jul 29 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Edward C. Jones | last post by:
On 2003-09-04, Rasmus Fogh said: > I need a way of writing strings or arbitrary Python code that will > > a) allow the strings to be read again unchanged (like repr) > b) write multiline...
8
by: Christoph Zwerschke | last post by:
I sometimes use triple quotes in order to produce snippets of multiline code, like that: if output == html: snip = '''<html> <head><title>Hello, World</title></head> <body...
11
by: bearophile | last post by:
Hello, here are a four more questions (or suggestions) for the language (probably people have already discussed some of/all such things: I've seen the contracts for Python:...
7
by: Brian van den Broek | last post by:
Hi all, I'm posting partly so my problem and solution might be more easily found by google, and partly out of mere curiosity. I've just spent a frustrating bit of time figuring out why pydoc...
4
by: Kurt | last post by:
Wouldn't you agree all of the follwoing should produce the same result? r = (o1 == o2); r = (o2 == o1); r = object.Equals(o1, o2); r = object.Equals(o2, o1); r = (o1.Equals(o2)); r =...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
14
by: dmh2000 | last post by:
I recently complained elsewhere that Python doesn't have multiline comments. i was told to use triple quoted strings to make multiline comments. My question is that since a triple quoted string is...
15
by: Andy Mabbett | last post by:
Google finds: Results 1 - 20 of about 34,000 linking to http://www.w3.org/WAI/WCAG1AAA-Conformance -- Andy Mabbett Say "NO!" to compulsory ID Cards: <http://www.no2id.net/> Free Our...
10
by: r035198x | last post by:
The Object class has five non final methods namely equals, hashCode, toString, clone, and finalize. These were designed to be overridden according to specific general contracts. Other classes that...
8
by: Lawrence D'Oliveiro | last post by:
If triple-quoted strings had the Python-nature, then they would take indentation into account. Thus: """this is a multi-line string.""" would be equivalent to
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.