10.02.2013 Views

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

PHP Programming Language - OpenLibra

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SWiZ 283<br />

SWiZ<br />

SWiZ (simple visualisation classes) is open source web application framework for <strong>PHP</strong>.<br />

SWiZ is rapid prototyping fr and follows the model-view-controller (MVC) paradigm. Common aspects in SWiZ are<br />

modular and overridable.<br />

External links<br />

• SWiZ Homepage [1]<br />

References<br />

[1] http:/ / www. swiz. cz<br />

Scope resolution operator<br />

In computer programming, scope is an enclosing context where values and expressions are associated. The scope<br />

resolution operator helps to identify and specify the context to which an identifier refers. The specific uses vary<br />

across different programming languages with the notions of scoping.<br />

Ruby<br />

Ruby has several different scoping operators:<br />

• global variable identifiers begin with a '$' character (e.g. "$shared_throughout_the_runtime")<br />

• class variable identifiers begin with two '@' characters (e.g. @@all_objects_of_this_type_share_this)<br />

• instance variable identifiers begin with a single '@' character (e.g. @just_for_the_owning_object)<br />

• local variables begin with anything other than these special characters<br />

C++<br />

The scope resolution operator (::) in C++ is used to define the already declared member functions (in the header<br />

file with the .hpp or the .h extension) of the class. In the .cpp file one can define the normal functions or the member<br />

functions of the class. To differentiate from the normal functions with the member functions of the class, one needs<br />

to use the scope resolution operator (::) in between the class name and the member function name i.e. ship::foo()<br />

where the ship is the class and the foo() is the member function in the ship. The other uses of the resolution operator<br />

is to resolve the scope of the variables if the same variable name is used for the global, local, and the data member of<br />

the class. If the resolution operator is placed between the class name and the data member belonging to the class then<br />

the data name belonging to the particular class is affected. If the resolution operator is placed in front of the variable<br />

name then the global variable is affected. If no resolution operator is placed then the local variable is affected.<br />

Example<br />

#include <br />

using namespace std;<br />

int n = 12; // A global variable

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!