Apr-25-2023, 07:18 PM
i'm still having trouble with semicolons. but it does not seem to be the spacing issue i previously thought it was. here is my latest example (avoiding a big 900 line file that has it today) [under Xubuntu 20.04 and Python 3.8]:
Output:lt1a/phil/6 /home/phil 18> box try_semicolon.py try_fred.py
+----<try_semicolon.py>----------------------+
| fred=6 |
| print('one') |
| print('two') |
| print('three');print('four');print('five') |
| print('six') |
| print('seven') |
+--------------------------------------------+
+----<try_fred.py>-----------------------------------------------------+
| fred=8 |
| print('one') |
| print('two') |
| print('three');print('four');print('five');if fred==8: print('fred') |
| print('six') |
| print('seven') |
+----------------------------------------------------------------------+
lt1a/phil/6 /home/phil 19> python3.8 try_semicolon.py
one
two
three
four
five
six
seven
lt1a/phil/6 /home/phil 20> python3.8 try_fred.py
File "try_fred.py", line 4
print('three');print('four');print('five');if fred==8: print('fred')
^
SyntaxError: invalid syntax
lt1a/phil/6 /home/phil 21>
what am i doing wrong in this case?