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

setPrompts

setPrompts(
s_prompt1
s_prompt2
)
=> t / nil

Description

Sets the prompt text string for the CIW. The first prompt is used to indicate the topmost top-level. The second prompt is used whenever a nested top-level is entered.

The text string for s_prompt2 should always be the %d format string, which behaves the same as the printf() format string, such that the nesting level of a nested top-level will be shown as it deepens.

Changing prompts in some applications can seriously interfere with their functioning. Therefore, be careful using this function.

Arguments

s_prompt1

Prompt text string.

s_prompt2

Prompt text string.

Value Returned

t

The prompt has been set.

nil

Issues an error message if the prompt is not changed.

Examples

setPrompts("~> " "<%d>> ")
t
~> toplevel( 'ils )
ILS-<2>> toplevel( 'ils )
ILS-<3>>

Sets the topmost top-level to ~> and the nested top-level to <%d>> :

setPrompts("~> " "<%s>> ")
*Error* setPrompts: setPrompts expected %d not %s in prompt --
<%s>>

%s is an illegal format string.

Related Topics

Core Functions


Return to top
 ⠀
X