Name:
#region
Syntax:

#REGION "description"

(code goes here)

#ENDREGION

Description:

Start a user defined region.

Used in conjunction with the #endregion directive PICAXE program sections can be split into regions which can be individually collapsed and expanded when editing. This allows for the source code to be sectioned into easily manageable parts with appropriate code placed into an appropriate region depending on functionality.

#region is ignored by the compiler, it makes no difference to compilation. Use #rem to comment out lines of code.

 

Applies To:
All
See Also:
Related Create:
    Share:
    Print:

    Utilising regions

    This program has two regions; the main program and the display routine

    Code Example:
    #region "Main Program"
    
    main:
    	gosub display
    	w0 = w0 + 1
    	pause 1000
    	goto main
    	
    #endregion
    
    #region "Display Routine"
    
    display:
    	sertxd( #w0, cr, lf )
    	return
    
    #endregion
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.

    Comments

    • Login to leave a comment.