السلام عليكم
ياريت طريقة كتابة
if
switch
for
while
ياريت طريقة كتابتهم
وشكرا
السلام عليكم
ياريت طريقة كتابة
if
switch
for
while
ياريت طريقة كتابتهم
وشكرا
لو راجعت اي كتاب او مرجع لوجدتهم مليئين بالامثلة, ايضا لا يخلو اي كود منهم.. باي حال, في الفيجوال بسيك لا يوجد امر Swith وانما هو موجود في C
' simple IF clause IF conditionTHEN statement END IF ' Nested IF clause IF condition THEN statement1 ELSE statement2 END IF ' Another type of nested clause IF condition1 THEN statement1 ELSEIF condition2 THEN statement2 ELSEIF condition3 THEN statement3 ELSEIF conditionN THEN statementN ELSE statementX END IF
' Simple FOR FOR i = start_value TO end_value ' where "i" stands for the counter ' write whatever you want here to be executed ' "n" times, where start_value =< i =< end_value NEXT ' Nested FOR..NEXT caluse is the same as the IF one
i = start_value n = end_value WHILE i =< n ' ofcourse you can use any comparison type, > < = <> =< => ' write what ever you wanna execute "n" times ' i & n must be defined before using WHILE..LOOP statement i = i + 1 ' or i = i + 2 .. or whatever LOOP ' FOR increases "i" automatically by 1, if you wanna increase it by "n" number then use: ' FOR i = start TO end STEP n -- where "n" is the increasing number ' WHILE does the same but you must increase "i" manually with the line: i = i + 1
hope that helps.
تم تعديل هذه المشاركة بواسطة Xacker في 21 مارس 2006 في 15:47
Do as I say, not as I do
We are Anonymous. We are Legion. We don't forgive. We don't forget
بعد هذا الشرح
لن تجد!
الكائن Command و مثال هام عليه
حمل المقالة الكاملة عن الكائن Command
أحقن ملفك بملف أخر على نظام ملفات FAT
They disguise it hypnotize it
Television made you buy it
Mezmerize the simple minded
Propaganda leaves us blinded
هذا الموضوع مغلق.