fn: add_scope
[contents]

Contents

Syntax

The syntax for add_scope calls is:

f++:  
add_scope()
add_scope(bool) 

n++:  
@add_scope()
@add_scope(bool) 

Description

The add_scope function is for getting and setting whether to add scope by default for things like if statements, for, while and do-while loops, and user-defined function calls. It either:

  • takes zero parameters and returns whether scope is added by default; or
  • takes a single boolean parameter specifying whether to add scope by default (default value is 1).

f++ example

Example of add_scope being used with f++:

add_scope(0)
console(add_scope())

for(int i=0; i<2000000; i+=1){}

n++ example

Example of add_scope being used with n++:

@add_scope(0)
@console(add_scope())

@for{!o}(int i=0; i<2000000; i+=1){}