Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 57

Curly-Bracket Languages

Оглавление

Whether you learn about programming using a simpler language or jump right in and start with C, you'll eventually need to learn one of the more popular programming languages based on C. This family of related languages is known as the curly-bracket language family.

The curly-bracket language family gets its name because all the languages use curly brackets to define the start and end of a block of commands, like this:

#include <stdio.h>void main(){ printf("Notice how the curly brackets\n"); printf("identify the beginning and end\n"); printf("of your commands?\n");}

Rather than use curly brackets, programming languages like Ada or Pascal use descriptive words, like Begin or End, to identify the start and end of a block of code. Descriptive words look clearer but can be more cumbersome to type. To eliminate curly brackets or descriptive words like Begin or End, Python uses indentation to define the beginning and end of a block of code.

Beginning Programming All-in-One For Dummies

Подняться наверх