FunctionParameterName: Function parameter name

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/FunctionParameterName.R

Description

Class to define and handle a function parameter

Usage

1

Arguments

name_s_1

the name of the parameter

Details

The name of the parameter should be a semantic name. A semantic name is a compound string based on a special format allowing to distinguish by the name, the parameter type, and to express some length constraints.

Value

An object that is an R environment. Use functions isSemanticName, isPolymorphic, isEllipsis, isValid to check the provided name. Functions get* allows to retrieve parts of the name.

Author(s)

Fabien Gelineau <neonira@gmail.com>

Maintainer: Fabien Gelineau <neonira@gmail.com>

See Also

Refer to defineEvaluationModes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
##---- typical case ----
fpn <- FunctionParameterName('values_s_7m')
fpn$isPolymorphic()
fpn$isSemanticName()
fpn$isValid()
fpn$getTypeSuffix() # 's'
fpn$getLengthSpecification() # '7m'
fpn$getLengthSuffix() # 7
fpn$getLengthModifier() # 'm'

fpn <- FunctionParameterName('object_')
fpn$isPolymorphic()
fpn$isSemanticName()
fpn$isValid()

neonira/wyz.code.offensiveProgramming documentation built on Feb. 20, 2020, 2:01 p.m.