Multiplication tables: Difference between revisions
Content deleted Content added
m →Traditional approach: mystipe |
|||
Line 1,762: | Line 1,762: | ||
Some fortrans offer an extension to FORMAT statements, whereby a variable can appear in place of an integer constant, thus instead of say FORMAT (12I4) there could be FORMAT (<n>I4) for example. Then, during the interpretation of the FORMAT text, the current value of variable ''n'' would be accessed. Note that this is on-the-fly: |
Some fortrans offer an extension to FORMAT statements, whereby a variable can appear in place of an integer constant, thus instead of say FORMAT (12I4) there could be FORMAT (<n>I4) for example. Then, during the interpretation of the FORMAT text, the current value of variable ''n'' would be accessed. Note that this is on-the-fly: |
||
READ(in,"(I2,<N>I4)") N,(A(I),I = 1,N) |
READ(in,"(I2,<N>I4)") N,(A(I),I = 1,N) |
||
would read N as a two-digit integer, and, as the READ |
would read N as a two-digit integer, and, as the READ statement executes further, use that value of N both in the FORMAT text's interpretation and in the further processing of the READ statement. |
||
=={{header|Go}}== |
=={{header|Go}}== |