# OBUFFER

OBUFFER stands for Output Buffer.

* It is a keyword.
* It is used to store values in output buffer.
* To display content of OBUFFER, use ***'console'*** attribute.

```javascript
{
   name : Main
   
   @ use += to add content to OBUFFER
   OBUFFER += 27062003
   OBUFFER += "\tSaksham Joshi"
   
   @ to display content on terminal
   console : ( OBUFFER )

   @ remember you **cannot** print the OBUFFER using print or println
   @ println( OBUFFER )
   @ because OBUFFER is managed by interpreter itself 
}
```

<mark style="color:yellow;">**OBUFFER can speed up your code's speed by 100 times if you use it smartly.**</mark>\
\
Look at this code for instance:

```javascript
{
   name : Main
   
   for : {
       range : ( Int i = 0 , 10000 )
       console : ( i , '\n')
    }
    
    console : ("\n Time taken = " , getExecTime())
}
```

And if I want to optimize this code using 'OBUFFER', then

```javascript
{
   name : Main
   
   for : {
       range : ( Int i = 0 , 10000 )
       OBUFFER += i
       OBUFFER += '\n'
    }
    
    console : ( OBUFFER, "\n Time taken = " , getExecTime())
}
```

Run these both code and you will understand how OBUFFER can be used to achieve greater optimization levels.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sron.gitbook.io/docs/obuffer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
