Guest_imported
New member
- Jan 1, 1970
- 0
Example:
Input Data:
Line 1 Mr. John Q. Sample
Line 2
Line 3 1234 Any Street
Line 4 Anytown, US 99999
Desired Top Justified Output Data:
Line 1 Mr. John Q. Sample
Line 2 1234 Any Street
Line 3 Anytown, US 99999
Line 4
Desired Bottom Justified Output Data:
Line 1
Line 2 Mr. John Q. Sample
Line 3 1234 Any Street
Line 4 Anytown, US 99999
Code:
if Line4 = "" then
PrintLine Line4
PrintLine Line1
PrintLine Line2
PrintLine Line3
else
PrintLine Line1
PrintLine Line2
PrintLine Line3
PrintLine Line4
endif
How do I rewrite PrintLine as a function that outputs a string to a file or have it output a blank line if the input string is empty.
Input Data:
Line 1 Mr. John Q. Sample
Line 2
Line 3 1234 Any Street
Line 4 Anytown, US 99999
Desired Top Justified Output Data:
Line 1 Mr. John Q. Sample
Line 2 1234 Any Street
Line 3 Anytown, US 99999
Line 4
Desired Bottom Justified Output Data:
Line 1
Line 2 Mr. John Q. Sample
Line 3 1234 Any Street
Line 4 Anytown, US 99999
Code:
if Line4 = "" then
PrintLine Line4
PrintLine Line1
PrintLine Line2
PrintLine Line3
else
PrintLine Line1
PrintLine Line2
PrintLine Line3
PrintLine Line4
endif
How do I rewrite PrintLine as a function that outputs a string to a file or have it output a blank line if the input string is empty.