Compiler Error 1504 - Crestron SIMPL+ Reference Manual

Language reference guide
Hide thumbs Also See for SIMPL+:
Table of Contents

Advertisement

Software
®
322
SIMPL+
i = IsSignalDefined( str );
an Input
digOut = IsSignalDefined( 5 );
an Input
}

Compiler Error 1504

function argument error: Incomplete number of format string
Format lists contain format specifiers that tell the compiler to replace a given
specifier with the value or result given in the argument list that follows. A format list
is analogous to a function parameter list in that the format specifier tells the compiler
what type of argument to expect. For each format specifier, their must be a
corresponding value or result in the argument list that follows. This value or result
must also be of the same datatype.
Format strings contain specifications that determine the output format for the
arguments. The format argument consists of ordinary characters, escape sequences,
and (if arguments follow format) format specifications Format Specifications always
begin with a percent sign (%) and are read left to right. When the first format
specification is encountered (if any), it converts the value of the first argument after
format and outputs it accordingly. The second format specification causes the second
argument to be converted and output, and so on.
The following are examples of this error:
FUNCTION MyFunc()
{
INTEGER x, intArr[100];
STRING str[100], strArr[100][100];
Print( "Hello World" );
Print( "My name is %s.
/ ok
Print( "My name is %s. My age is %d", str, x );
MakeString( str, "Hello World" );
MakeString( str, "My name is %s.
// ok
Print( "My name is %s.
error –
Crestron SIMPL+
//
// error – 'i' is not
//
// error – '5' is not
//
arguments
Format string contains an
unmatched number of arguments
Argument <arg_num> is missing
or invalid.
Format Specifier expected
Argument <arg_num> is missing
or invalid. <decl_type> expected
My age is %d", "David", 33 );
My age is %d", str, x );
My age is %d", "David" );
// %d format specifier does not have a
Language Reference Guide - DOC. 5797G
®
or Output signal
or Output signal
or Output signal
// ok
/
// ok
// ok
//

Advertisement

Table of Contents
loading

Table of Contents