clear()

clear() is used to set all the elements to their initial value. This method accepts no parameters.

Syntax:

array_variable.clear()

Usage example:

DEFINE ar ARRAY[15] OF INT

...

  FOR i = 1 TO 15                 #the array has 15 elements

    LET ar[i] = i

  END FOR

CALL array_variable.clear()      #all the 15 elements are discarded to 0 values

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.