fn: lolcat
[contents]

Contents

Nift console screenshot

Syntax

The syntax for lolcat calls is:

f++:  
lolcat{options}(params)

n++:  
@lolcat{options}(params)

Description

The lolcat function is for outputting text with rainbow colours to the console with a linebreak automatically added to the end, it takes an aribtrary number of parameters (it is similar to console except with rainbows). You can use endl as a parameter for flushed line breaks, \n for unflushed.

Note: There is a modified version of lolcat-cc in-built in to Nift, however you can use lolcat with quite a few different implementations installed on your machine. It is available for:

Note: If you want multiple lolcat calls to print to the console without being interrupted by output from threads building other files then use console.lock and console.unlock.

Options

The following options are available for lolcat calls:

option description
b or block read and output block of text following console call
!pb do not parse block of text
option description

f++ example

Example of lolcat being used with f++:

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

n++ example

Example of lolcat being used with n++:

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

lolcat-cc mascot