Smalltalk в примерах/Сообщения: различия между версиями
Содержимое удалено Содержимое добавлено
Kolas (обсуждение | вклад) м орфография |
|||
Строка 44:
Мы всё ещё нуждаемся в другом типе сообщений с одним аргументом и более чем с одним аргументом. Сообщения с <i>ключевым словом</i> являются таковыми. Например:
'elephant' copyFrom: 3 to: 5
возвращает строку '
<!--
We still need to be able to other types of messages with one argument and messages with more than one argument. The keyword message lets us do this. For example:
'elephant' copyFrom: 3 to: 5
gives the string 'eph' (Smalltalk collections are 1 based rather than 0 based as in C and C++; ie, the first
element in the collection is referenced by index 1). The colons separate out the keywords in the message, where
each keyword takes an argument. (In strict terms, copyFrom: 3 to: 5 is the message and
copyFrom:to: is the message selector, but we will also refer to copyFrom:to: as the message.)
-->
==Последовательные сообщения==
|