Asked • 07/19/19

Comma at the end of True Basic if statement?

I've been working on translating a simulation written in True Basic to C, and eventually into CUDA. Considering I have never worked with True Basic, let alone basic, everything has been going smooth. One item that I would like some clarification on is how the comma at the end of line 3 will affect the applications behavior. Basically what I'm wondering is: Does line 4 execute only when the IF statement is evaluated to true (i.e. part of the if statement) or is the IF statement's evaluation (true or false) arbitrary in regards to the execution of line 4? True Basic code snippet; 1. FOR i=1 to n 2. FOR j=1 to anumber-1 3. IF j = 1 or j > 4 then PRINT g(i,j), 4. LET tg(j) = tg(j) + g(i,j) 5. NEXT j 6. NEXT i

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.