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

char initial value

Former Member
0 Likes
2,586

Hi,

Can you please clarify.

DATA: val_persg(1) type c.

clear val_persg.

write val_persg.

What willl be the output. It will be empty string and empty string with one space.

Similarly,

DATA:

flag_persg type boolean.

clear flag_persg.

write flag_persg.

Output will be true or false or someother.Please clarify.

6 REPLIES 6
Read only

Former Member
0 Likes
1,553

In both cases the output will be a single blank.

For flag - it is 'X' if it is true and blank if it is false.

Read only

Former Member
0 Likes
1,553

Hello,

Ouput will be single space.

Please confirm yourself by writing code and executing.

Thanx. Praveen

Read only

Former Member
0 Likes
1,553

Hi Deepan .,

It will be blank space in both the cases.

thanks

sreenivas

Read only

Former Member
0 Likes
1,553

Hi,

DATA: val_persg(1) type c.

DATA: flag_persg type boolean.

clear val_persg.

write val_persg.

clear flag_persg.

write flag_persg.

obviously the output is blank.

thanx.

Read only

Former Member
0 Likes
1,553

Hi,

In both the cases clearing wont effect the intial value of the boolean and Character.

The character will have a space as a default value and the boolean will remain as false only..

If you try to write the intial value of a character and a boolean you will get blank only.

Regards,

Amit.

Edited by: AMIT BISHT on Aug 27, 2008 7:56 AM

Read only

Subhankar
Active Contributor
0 Likes
1,553

Hi...

In both cases the output will blank ....

It is not like that length of the character field is one that's why it will be single blank.Only the thing is that it is blank means nothing no single blank..