LockdateforGHS

fortran id slapper

Apr 21st, 2021 (edited)
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. get function = true
  2.     parameter = /: real
  3.      real func
  4.          end
  5.          
  6.          
  7.          end
  8.                return end
  9.                   0)(real
  10.                       or program
  11.                         loc
  12.                           key+ end
  13.                           end
  14.                              ("attribute");
  15.                                   write program > (
  16.                                   read program
  17.                                       then
  18.                                           real program
  19.                                            fortran is old
  20.                                          
  21.                                          
  22.                                                      
  23.                                                       print(complex/ids)?if
  24.                                                      
  25.                                                      
  26.                                                      
  27.                                                       complex = t
  28.                                                      
  29.                                                        use sign
  30.                                                             tru4
  31.                                                                   and fortran
  32.                                                                   {{
  33.                                                                         optional choice
  34.                                                                              ped
  35.                                                  real = then
  36.                                                   use attribute
  37.                                                     then
  38.                                                       use program
  39.                                                       or else
  40.                                                         program
  41.                                                          id:
  42.                                                           TO program =
  43.                                                          
  44.                                                           length = 1, < 3 3,, < 2> 5
  45.                                                            ThisIsALongFORTRANname = else
  46.                                                            Integer Constants: a string of digits with an optional sign:
  47. Correct Examples: 0, -345, 768, +12345
  48. Incorrect Examples:
  49. 1,234 : comma is not allowed
  50. 12.0: no decimal point
  51. --4 and ++3: too many optional signs
  52. 5- and 7+: the optional sign must precede the string of digits
  53. Real Constants: There are two representations, decimal representation and exponential representation.
  54. Decimal Representation: A decimal point must be presented, but no commas are allowed. A real constant can have an optional sign.
  55. Correct Examples: 23.45, .123, 123., -0.12, -.12
  56. Incorrect Examples:
  57. 12,345.95: no comma is allowed
  58. 75: real constant must have a decimal point
  59. 123.5-: the optional sign must precede the number
  60. $12.34: cannot use dollar sign $
  61. Exponential Representation: It consists of an integer or a real number in decimal representation (the mantissa or fractional part), followed by the letter E or e, followed by an integer (the exponent).
  62. Correct Examples
  63. 12.3456E2 or 12.3456e2: this is equal to 1234.56
  64. -3.14E1 or -3.14e1: this is equal to -31.4
  65. -1.2E-3 or -1.2e-3: this is equal to -0.0012
  66. 12E3 or 12e3: this is equal to 12000.0
  67. 0E0 or 0e0: this is equal to 0.0
  68. Incorrect Examples
  69. 12.34E1.2: the exponential part must be an integer constant
  70. 12.34-5: there is no exponential sign E or e
  71. Complex: Will not be covered in this course
  72. Logical: See Chapter 3
  73. Character String: Character constants must be enclosed between double quotes or apostrophes (single quotes).
  74. The  of a string consists of all characters, spaces included, between the single or quote quotes, while the  of the string is the number of characters of its content. The content of a string can be zero and in this case it is an
  75. Correct Examples:
  76. 'John' and "John": content = John and length = 4
  77. ' ' and " ": content = a single space and length = 1
  78. 'John Dow #2' and "John Dow #2": content = John Dow #2 and length = 11
  79. '' and "": content = nothing and length = 0 (empty string)
  80. Incorrect Examples:
  81. 'you and me: the closing apostrophe is missing
  82. Hello, world': the opening apostrophe is missing
  83. 'Hi" and "Hi': the opening and closing quotes do not match.
  84. If single quote is used in a string, then double quotes should be used to enclose the string:
  85. "Lori's apple"
  86. This string has content Lori's apple and length 12. Alternatively, you can write the single quote twice as follows:
  87. 'Lori''s apple'
  88. The compiler will treat a pair of single quotes in the content of a string as one. Thus, the content of the above string is still Lori's apple.
  89. Correct Examples:
  90. 'What''s this?': content = What's this? and length = 11
  91. '''''': content = '' and length = 2
  92. Incorrect Examples:
  93. 'Tech's seminar': the single quote between h and s should be written twice.
  94.  end
  95.  end
  96.   end
  97.  
  98.                                  
Add Comment
Please, Sign In to add comment