<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=Quick_guide_to_F%24FAO%28%29</id>
	<title>Quick guide to F$FAO() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.vmssoftware.com/index.php?action=history&amp;feed=atom&amp;title=Quick_guide_to_F%24FAO%28%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=Quick_guide_to_F$FAO()&amp;action=history"/>
	<updated>2026-05-09T21:42:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=Quick_guide_to_F$FAO()&amp;diff=93&amp;oldid=prev</id>
		<title>Maxim Megalinskiy: Missing parenthesis</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=Quick_guide_to_F$FAO()&amp;diff=93&amp;oldid=prev"/>
		<updated>2018-09-13T10:48:46Z</updated>

		<summary type="html">&lt;p&gt;Missing parenthesis&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:48, 13 September 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|a string||!AS||f$fao(&amp;quot;Welcome back, !AS&amp;quot;,&amp;quot;John&amp;quot;)||Welcome back, John&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|a string||!AS||f$fao(&amp;quot;Welcome back, !AS&amp;quot;,&amp;quot;John&amp;quot;)||Welcome back, John&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|a singular/plural (more [[Quick guide to F$FAO()#Dealing with plurals|below]]||!%S||f$fao(&quot;I have !ZL apple!%S&quot;,5&quot;)&amp;lt;br&amp;gt;f$fao(&quot;I have !ZL apple!%S&quot;,1&quot;)||I have 5 apples&amp;lt;br&amp;gt;I have 1 apple&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|a singular/plural (more [[Quick guide to F$FAO()#Dealing with plurals|below]]&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;)&lt;/ins&gt;||!%S||f$fao(&quot;I have !ZL apple!%S&quot;,5&quot;)&amp;lt;br&amp;gt;f$fao(&quot;I have !ZL apple!%S&quot;,1&quot;)||I have 5 apples&amp;lt;br&amp;gt;I have 1 apple&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| a number|| !SL|| f$fao(&amp;quot;!SL&amp;quot;,-112)|| -112&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| a number|| !SL|| f$fao(&amp;quot;!SL&amp;quot;,-112)|| -112&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Maxim Megalinskiy</name></author>
	</entry>
	<entry>
		<id>https://wiki.vmssoftware.com/index.php?title=Quick_guide_to_F$FAO()&amp;diff=28&amp;oldid=prev</id>
		<title>Darya.zelenina: Created page with &quot;&#039;&#039;&#039;F$FAO()&#039;&#039;&#039; can be used to create good-looking formatted output including tables, dividers, numeric conversion, and more. The full list of F$FAO() control strings can be fou...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.vmssoftware.com/index.php?title=Quick_guide_to_F$FAO()&amp;diff=28&amp;oldid=prev"/>
		<updated>2018-08-22T09:58:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;F$FAO()&amp;#039;&amp;#039;&amp;#039; can be used to create good-looking formatted output including tables, dividers, numeric conversion, and more. The full list of F$FAO() control strings can be fou...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;F$FAO()&amp;#039;&amp;#039;&amp;#039; can be used to create good-looking formatted output including tables, dividers, numeric conversion, and more. The full list of F$FAO() control strings can be found in the [[F$FAO()|main article]].&lt;br /&gt;
&lt;br /&gt;
=Choosing a control string=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! You need to insert... !! Directive to use !! Example !! Result&lt;br /&gt;
|-&lt;br /&gt;
|a string||!AS||f$fao(&amp;quot;Welcome back, !AS&amp;quot;,&amp;quot;John&amp;quot;)||Welcome back, John&lt;br /&gt;
|-&lt;br /&gt;
|a singular/plural (more [[Quick guide to F$FAO()#Dealing with plurals|below]]||!%S||f$fao(&amp;quot;I have !ZL apple!%S&amp;quot;,5&amp;quot;)&amp;lt;br&amp;gt;f$fao(&amp;quot;I have !ZL apple!%S&amp;quot;,1&amp;quot;)||I have 5 apples&amp;lt;br&amp;gt;I have 1 apple&lt;br /&gt;
|-&lt;br /&gt;
| a number|| !SL|| f$fao(&amp;quot;!SL&amp;quot;,-112)|| -112&lt;br /&gt;
|-&lt;br /&gt;
|the current time||!%T||f$fao(&amp;quot;It&amp;#039;s !%T now&amp;quot;,0)||It&amp;#039;s 12:14:55.90 now&lt;br /&gt;
|-&lt;br /&gt;
|the current date/time||!%D||f$fao(&amp;quot;It&amp;#039;s !%D now&amp;quot;,0)||It&amp;#039;s 16-AUG-2018 12:15:02.28 now&lt;br /&gt;
|-&lt;br /&gt;
| a new line|| !/|| f$fao(&amp;quot;hello !/ goodbye&amp;quot;)|| &amp;lt;pre&amp;gt;$ write sys$output f$fao(&amp;quot;hello !/goodbye&amp;quot;)&amp;lt;br&amp;gt;hello&amp;lt;br&amp;gt;goodbye&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| a line of dashes/asterisks||!n*-||f$fao(&amp;quot;!25*-!/&amp;quot;)||-------------------------&lt;br /&gt;
|-&lt;br /&gt;
|put it in a field||!nDD||f$fao(&amp;quot;Total: !20SL&amp;quot;,73)||&amp;lt;pre&amp;gt;Total:                   73&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* To insert an actual exclamation point, use two exclamation points:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ write sys$output f$fao(&amp;quot;Hello!!&amp;quot;)&lt;br /&gt;
Hello!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Watch your argument types. If you use a wrong type of argument, such as an integer for !AS, you will get %SYSTEM-F-ACCVIO, access violation message.&lt;br /&gt;
&lt;br /&gt;
=Dealing with plurals=&lt;br /&gt;
&lt;br /&gt;
There is a special directive for English plurals (that are normally just -s): !%S. It inserts an &amp;quot;s&amp;quot; if the most recently &lt;br /&gt;
converted number is not 1:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ write sys$output f$fao(&amp;quot;I have !SL apple!%S&amp;quot;,5)&lt;br /&gt;
I have 5 apples&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;I have !SL apple!%S&amp;quot;,1)&lt;br /&gt;
I have 1 apple&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a different directive that lets you use other endings. For example, if you have the word &amp;quot;child&amp;quot;, the regular &amp;quot;s&amp;quot; will not work there. Here&amp;#039;s what you can use:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;!n%Cyour_ending&amp;#039;&amp;#039;&amp;#039; inserts a character string (your_ending) when the most recently evaluated argument has the value n&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;!%Eyour_ending&amp;#039;&amp;#039;&amp;#039; inserts a character string (your_ending) when the most recently evaluated argument does not match any of the preceding !n%C directives.&lt;br /&gt;
* When you are done defining the forms of that single word, use the !%F directive to mark the end of the plurals statement.**&lt;br /&gt;
&lt;br /&gt;
So, for the case with &amp;#039;&amp;#039;&amp;#039;child&amp;#039;&amp;#039;&amp;#039;, you need the system to use no ending if the number is 1 and the ending &amp;quot;ren&amp;quot; if the number is anything but one:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ write sys$output f$fao(&amp;quot;I have !SL child!1%C !%Eren !%F&amp;quot;,1)&lt;br /&gt;
I have 1 child&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;I have !SL child!1%C !%Eren !%F&amp;quot;,5)&lt;br /&gt;
I have 5 children&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another example is offered by the online help on F$FAO:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;REPORT = F$FAO(&amp;quot;There !0UL!1%Cis!%Eare!%F !-!UL !-!0UL!1%Cchild!%Echildren!%F here&amp;quot;,OFFSPRING)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how this works for languages with multiple number forms. For example, let&amp;#039;s count cats in Polish:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,1)&lt;br /&gt;
1 kot&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,2)&lt;br /&gt;
2 koty&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,3)&lt;br /&gt;
3 koty&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,4)&lt;br /&gt;
4 koty&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,5)&lt;br /&gt;
5 kotow&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,6)&lt;br /&gt;
6 kotow&lt;br /&gt;
$ write sys$output f$fao(&amp;quot;!SB kot!1%C !2%Cy !3%Cy !4%Cy !%Eow !%F&amp;quot;,7)&lt;br /&gt;
7 kotow&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Darya.zelenina</name></author>
	</entry>
</feed>