Monday, January 23, 2012

READ Statements

This statement reads values from the DATA statement and assigns them to corresponding variables. Its Syntax is:
                READ comma-separated list of variables
                The READ statement is a part of the DATA statement and is always used in conjunction. The READ statement specifies a list of variables and reads the corresponding values for these variables from the list of constants specified in DATA statement. The first variable in READ statement is assigned by the first value from the list of constants in DATA statement. Similarly the second variable in READ statement is assigned by  the second value  from the list of constants in DATA statement, and so on. The variable type (numeric or string) given in READ statement must agree with the corresponding constant in the DATA statement

1 comment:

  1. can you please help me in in using read data while taking input as the data simultaneously in one program?

    ReplyDelete