Tworzenie stron WWW to podstawa pracy webmastera. Dlatego każdy webmaster ma swój Poradnik Webmastera, z którego korzysta gdy potrzebuje wiedzy o języku HTML, CSS albo szuka czegoś w kursie JavaScript. Dzięki tak potężniej dawce wiedzy może on tworzyć profesjonalnie wyglądające strony WWW.

meble skórzane - klinkier - Automatyka budynków - wagi samochodowe - pozycjonowanie stron wrocław - Darmowe Szablony - Działki Tychy - Odzyskiwanie danych - fotografia ślubna - pasozyty - Wanna - projektowanie ogrodów - Akcesoria do łazienki - Pavilion - testy ciążowe
Podręcznik PEAR
PoprzedniRozdział 4. Coding StandardsNastępny

Control Structures

These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated of them:

if ((condition1) || (condition2)) {
    action1;
} elseif ((condition3) && (condition4)) {
    action2;
} else {
    defaultaction;
}

Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls.

You are strongly encouraged to always use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.

For switch statements:

switch (condition) {
case 1:
    action1;
    break;

case 2:
    action2;
    break;

default:
    defaultaction;
    break;
}


PoprzedniSpis treściNastępny
Coding StandardsPoczątek rozdziałuFunction Calls

Copyright © 2007 Office. Designed by Free CSS Templates.