ACReset
ACReset
 
Parameters: NONE
Returns: NONE
 

     ACReset resets the compiler internal Auto Counter value to 0.

      Note: PlayBASIC's Auto Counter commands will help you to create structures or unique tokens.




FACTS:


      * You can also reset the auto counter to zero (or some other value) by making an assignment to either AC or ACset.

      Making the following (Ac= 10) identical to using AcSet =10





Mini Tutorial:


      Showing the use of AC, ACSet and ACReset


  
; Set the Auto Counter to 0
  ACReset
  
; Use AC multiple times, which increases auto counter by 1 each time
  Print AC(1)
  Print AC(1)
  Print AC(1)
  
; Set the Auto Counter to 10
  ACSet = 10
  
; Since the auto counter is evaluated at compile time,
; you can assigned its values to constants as well
  Constant Play_Mode = AC(2)
  Constant Menu_Mode = AC(2)
  
  Print Play_Mode
  Print Menu_Mode
  
; Display the screen and wait for a key to be pressed
  Sync
  WaitKey
  


This example would output.

  
  0.0
  1.0
  2.0
  10
  12
  




 
Related Info: AC | ACSet | Constant | Select | Variables :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com