1
votes

Trying to translate BASIC code written in the 1990's to Python. I keep coming across two symbols, ! (exclamation mark) and . (period mark). I can't find any documentation online on what they do. I have the code running but some of the outputs are not as expected - I am wondering if these might be the issue as I previously thought that the period mark may just be a typo for a multiplication.

Examples:

QWLOST = (((TW-TDAO)/(TWRT-TDAOR))^1.25)*((VISR/VIS)^0.25)**.**(PW+PE)*DT

TFAVE = (TTO+TBO)/2!

Thanks!

2

2 Answers

1
votes

In case anyone else in the future needs to know this.

! - defines a single . - Was just a typo for * (multiplication)

1
votes

I tried a few things in bwBasic (in Linux, in case that's relevant!).

bwBASIC: list

 10: for i = 1 to 20

 20:   print i, ., . - i

 30: next i

 40: print ".="; .

This gave me:

bwBASIC: run

1 20 19

2 20 18

3 20 17

4 20 16

5 20 15

6 20 14

7 20 13

8 20 12

9 20 11

10 20 10

11 20 9

12 20 8

13 20 7

14 20 6

15 20 5

16 20 4

17 20 3

18 20 2

19 20 1

20 20 0

.= 20

Which would suggest that . (in bwBasic in any case) is the max number in a for loop.