|
- do.until,
do.whileأمري الشرط
الأمرين do.until,
do.while
يشبهان الأمرين while
و
until فيما عدا أن فعل الشرط
وجواب الشرط يكونا معكوسين.
استخدام
امري الشرط until
and while:
الصيغة العامة:
do.until [action][condition]
do.while [action][condition]
make "count 1
do.until [print :count make "count :count + 1][:count > 10]
....
produces: 1 2 3 4 5 6 7 8 9 10
make "count 1
do.while [print :count make "count :count + 1][:count < 10]
....
produces: 1 2 3 4 5 6 7 8 9
ملحوظة
: يمكن أن يضم القوس المربع الكثير من الأشياء
ومنها الإجراءات .
|