fn: lolcat.on
[contents]

Contents

Nift console screenshot

Syntax

The syntax for lolcat.on calls is:

f++:  
lolcat.on

n++:  
@lolcat.on

Description

The lolcat.on function is for turning on outputting text to the console with rainbow colours, it takes zero parameters.

Note: lolcat will only work if you have the program lolcat installed on your machine. It is available for:

If you find a working version for Windows please let us know.

Note: Nift will skip to the first non-whitespace (ie. to the first character that is not a space, tab or newline) after a lolcat.on call and inject it to the output file where the call started. If you want to prevent Nift from doing this put a '!' after the call, eg.:

@lolcat.on()!

f++ example

Example of lolcat.on being used with f++:

:=(int, i=12)
:=(string, str="hello")
lolcat.on
console.lock
console("i: ", i)
console(str, ", world!")
console("first line", endl, "second line")
console{block}
{
	first line
	second line
	third line
}
console.unlock
lolcat.off

n++ example

Example of lolcat.on being used with n++:

@:=(int, i=12)
@:=(string, str="hello")
@lolcat.on
@console.lock
@console("i: ", i)
@console(str, ", world!")
@console("first line", endl, "second line")
@console{block}
{
	first line
	second line
	third line
}
@console.unlock
@lolcat.off

Sponsors