Ax Code X++ For Loop While Loop
static void ForWhile(Args _args)
{
int i; // Control variable.
int ex=-1;
real curVal;
real _Value=5;
;
i = 1;
while (i <= 100)
{
info(strfmt('%1',i));
i++;
}
for (i=1; i<=100; i+=1)
{
info(strfmt('%1',i));
}
for (i=1; i<=5; i++)
{
info(strfmt('%1',i));
}
do
{
ex += 1;
curVal = power(10, ex);
}
while (_Value>curVal);
info(strfmt('%1',ex));
}
{
int i; // Control variable.
int ex=-1;
real curVal;
real _Value=5;
;
i = 1;
while (i <= 100)
{
info(strfmt('%1',i));
i++;
}
for (i=1; i<=100; i+=1)
{
info(strfmt('%1',i));
}
for (i=1; i<=5; i++)
{
info(strfmt('%1',i));
}
do
{
ex += 1;
curVal = power(10, ex);
}
while (_Value>curVal);
info(strfmt('%1',ex));
}
ความคิดเห็น
แสดงความคิดเห็น