fn: in
[contents]

Contents

Syntax

The syntax for in calls is:

f++:  
in{options}(string)

n++:  
@in{options}(string)

Description

The in function is for reading user input from console or from file. It takes zero parameters or a single string parameter that is an input message or even as a template when reading user input from file. There is also an option for the call to be followed by a block of text to use as the input message or even as a template when reading user input from file.

Options

The following options are available for in calls:

option description
b or block call follows with a block of text to use as an input message
!pb do not parse block
from-file get user input from file rather than from console
option description

f++ example

Examples of in being used with f++:

  1. in("please enter a name for your project:")

  1. in{b, from-file}
  2. {
  3. name:
  4. age:
  5. gender:
  6. }

n++ example

Examples of in being used with n++:

  1. @in("please enter a name for your project:")

  1. @in(@input("$[contentdir]/input-message.txt"))

  1. @in{from-file}(@input("$[contentdir]/input-template.txt"))

  1. @in{b, from-file}
  2. {
  3. name:
  4. age:
  5. gender:
  6. }