Application Development 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: 

how to clear integer variable

Former Member
0 Kudos

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

Former Member
0 Kudos

If your requirement is not to display zero values,

write 😕 val non-zero.

6 REPLIES 6

JozsefSzikszai
Active Contributor
0 Kudos

hi Ashish,

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

ec

Former Member
0 Kudos

Move intfield to charfield no-zero.

Now output this charecter field.

Regards

Vasu

Former Member
0 Kudos

If your requirement is not to display zero values,

write 😕 val non-zero.

0 Kudos

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

0 Kudos

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.

maciej_domagaa
Contributor
0 Kudos

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