Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to clear integer variable

Former Member
0 Likes
1,848

Hi,

I have an integare variable which appears as 0 in dialog program output screen. How do I clear this variable? With CLEAR, I am not able to clear 0.

Thanks,

Ashish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,265

If your requirement is not to display zero values,

write 😕 val non-zero.

6 REPLIES 6
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,265

hi Ashish,

the default value of an integer is 0, so bad...

ec

Read only

Former Member
0 Likes
1,265

Move intfield to charfield no-zero.

Now output this charecter field.

Regards

Vasu

Read only

Former Member
0 Likes
1,266

If your requirement is not to display zero values,

write 😕 val non-zero.

Read only

0 Likes
1,265

thanks..but this is for a dialog program where I have defined it as integer..I can not change it to character because I have to do some calculations by using integer.

thanks,

Ashsih

Read only

0 Likes
1,265

You have a character field on screen and later move that value to integer while doing calculations. You need to make sure that the CHAR field is validated correctly in order to accept only integer values.

Read only

Maciej_DomagaBa
Contributor
0 Likes
1,265

Clearing a variable with "clear" statements means exactly: setting the variable to its initial value. Initial value for integers is zero.

If you want to put this fields directly on a screen try a field of type NUMC (N) - a type for integer values represented by characters.

regards