Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

warn

warn( 
t_formatString 
[ g_arg1 ... ] 
) 
=> nil

Description

Buffers a warning message with given arguments inserted using the same format specification as sprintf, printf, and fprintf.

After a function returns to the top level, the buffered warning message is printed in the Command Interpreter Window. Arguments to warn use the same format specification as sprintf, printf, and fprintf.

This function is useful for printing SKILL warning messages in a consistent format. You can also suppress a message with a subsequent call to getWarn.

Arguments

t_formatString

Characters to print verbatim in the warning message with format specifications prefixed by the percent (%) sign.

g_arg1 ...

Optional arguments following the format string, which are printed according to their corresponding format specifications.

Value Returned

nil

Always returns nil.

Examples

arg1 = 'fail
warn( "setSkillPath: first argument must be a string or list of strings - %s\n" arg1)
=> nil
*WARNING* setSkillPath: first argument must be a string or list of strings - fail

Related Topics

Function and Program Structure


Return to top
 ⠀
X