EndDeclaration
Declaration .... List Of Variables ... EndDeclaration
 
Parameters: NONE
Returns: NONE
 

      EndDeclaration closes a variable declaration block.



FACTS:


      * See Explicit or Declaration for a more information.




Mini Tutorial:


      This example just demos the basics of variable Declaration blocks when using PlayBasics Explicit Variable declaration mode is enabled.

  
; -------------------------------------------------------
; NOTE: Explicit and ForceDeclaration  are interchangeable
; -------------------------------------------------------
  
; Force PlayBasic to expect all variables to now be
; declared prior to use
  
  Explicit
  
  
; declare a list of variables using a Declaration Block
  Declaration
     MyVariable
     MyFloatVariable#
     MyStringVariable$
  EndDeclaration
  
; Assign these variables some data
  MyVariable               =99
  MyFloatVariable#     =123.456
  MyStringVariable$ = "Hello World"
  
; Display the variables
  Print MyVariable
  Print MyFloatVariable#
  Print MyStringVariable$
  
  
; Display the screen and wait for the user to press a key
  Sync
  WaitKey
  
  



This example would output.

  
  99
  123.456
  "Hello World"
  

 
Related Info: Byte | Dim | Explicit | Float | ForceDeclaration | Global | Integer | Local | Pointer | Static | String | Type | Word :
 


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