From 2395bc85a87ff6ce44d4fecae29ca27bbc8f8e08 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 3 Oct 2020 18:36:12 +0530 Subject: [PATCH] String changes --- manual/template_lang.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manual/template_lang.rst b/manual/template_lang.rst index d694ffa44e..a203420950 100644 --- a/manual/template_lang.rst +++ b/manual/template_lang.rst @@ -403,7 +403,7 @@ Program mode also supports the classic relational (comparison) operators: ``==`` * ``program: if or(field('series') == 'foo', field('series') == '1632') then 'yes' else 'no' fi`` returns 'yes' if series is either 'foo' or '1632', otherwise 'no'. * ``program: if '11' > '2' then 'yes' else 'no' fi`` returns 'no' because it is doing a lexical comparison. If you want numeric comparison instead of lexical comparison, use the operators ``==#``, ``!=#``, ``<#``, ``<=#``, ``>#``, ``>=#``. In this case the left and right values are set to zero if they are undefined or the empty string. If they are not numbers then an error is raised. -General Program Mode support saving General Program Mode templates and calling those templates from another template. You save +General Program Mode supports saving General Program Mode templates and calling those templates from another template. You save templates using :guilabel:`Preferences->Advanced->Template functions`. More information is provided in that dialog. You call a template the same way you call a function, passing positional arguments if desired. An argument can be any expression. Examples of calling a template, assuming the stored template is named ``foo``: @@ -420,7 +420,7 @@ If the corresponding parameter is not provided in the call then ``arguments`` gi Examples, again assuming the stored template is named ``foo``: - * ``foo('#myseries')`` -- argument``key`` will have the value ``myseries`` and the argument ``alternate`` will have the value ``series``. + * ``foo('#myseries')`` -- argument ``key`` will have the value ``myseries`` and the argument ``alternate`` will have the value ``series``. * ``foo('series', '#genre')`` the variable ``key`` is assigned the value ``series`` and the variable ``alternate`` is assigned the value ``#genre``. * ``foo()`` -- the variable ``key`` is assigned the empty string and the variable ``alternate`` is assigned the value ``#genre``.