1. Home
  2. ENDDEBUG directive

ENDDEBUG directive

Cancels a DEBUG statement.

No options or parameters

Description

ENDDEBUG ends a debugging session instigated by the DEBUG directive, where more details are given.

Options: none.

Parameters: none.

See also

Directives: DEBUG, BREAK.

Commands for: Program control.

Example

" Example DEBU-1: De-bugging a procedure"

PROCEDURE 'POLAR'
   PARAMETER 'X','Y','R','THETA'
   " Takes (x,y) and returns (r,theta) "
   CALCULATE R = SQRT(X*X + Y*Y)
   CALCULATE THETA = ARCCOS(X/R)
   CALCULATE THETA = THETA + 2*(3.14159 - THETA)*(Y < 0)
ENDPROCEDURE

" Run thge procedure statement by statement"
SCALAR Xpos,Ypos; VALUE=3,4
DEBUG  
POLAR Xpos; Y=Ypos; R=Radius; THETA=Angle
ENDBREAK
PRINT R
ENDBREAK
PRINT THETA
ENDBREAK
CALCULATE Deg = THETA*180/3.14159
PRINT Deg
ENDDEBUG
PRINT Xpos,Ypos,Radius,Angle

Updated on March 8, 2019

Was this article helpful?