Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > System

format

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Toggles the script interpreter between 2 output precision states. The commands print (?) and num2str() use this state to determine how many digits of precision to output.

 

Supported Product: FDTD, MODE, DEVICE, INTERCONNECT

 

Syntax

Description

format long;

Set script interpreter to 16 digits of precision.

format short;

Set script interpreter to 6 digits of precision (maximum).

 

Examples

Print pi to screen in both output formats.

format short;

?pi;

result: 

3.14159

 

format long;

?pi;

result: 

3.141592653589793  

 

The behavior of the short and long format.

format short;

?1;

result: 

 

format long;

?1;

result: 

1.000000000000000 

 

See Also

System level, num2str, ?

Copyright Lumerical Inc. | Privacy | Site Map