0

Is the following code description correct ?

%% Test for empty Token List \feuds_teorema_parent_tl.

%% VTF are Type Specifers for the arguments to the function.

%% V Indicates that first argument is a variable (a Token List %% Variable in this case). The variable is specified by its name %% without the backslash.

%% T Indicates the code block to execute when test is true, %% when Token List Variable is empty.

%% F Indicates the code block to execute when test is false, %% when Token List Variable is not empty.

\tl_if_empty:VTF \feuds_teorema_parent_tl %% IF CONDITION - Empty Parent, No Parent Counter { \tl_if_empty:VTF \feuds_teorema_shared_tl %% IF CONDITION Empty Code Block { \feuds_newteora_simple:VV \feuds_teorema_name_tl \feuds_teorema_label_tl } %% ELSE CONDITION { %% Shared Counter \feuds_newteorema_shared:VVV \feuds_teorema_name_tl \feuds_teorema_label_tl \feuds_teorema_shared_tl } }

%% ELSE CONDITION Non-Empty Parent { %% Parent Counter \feuds_newteorema_parent:VVV \feuds_teorema_name_tl \feuds_teorema_label_tl \feuds_teorema_parent_tl }

Veak
  • 1
  • 2
    yes, as documented in interface3 section 15.3 – David Carlisle Sep 28 '23 at 23:24
  • As are definitions of V, T, and F in comments ? – Veak Sep 28 '23 at 23:48
  • They are documented earlier, but they're in interface3, too, yes. Your commented definition of V is partly wrong. See section 1.1. – cfr Sep 28 '23 at 23:51
  • sorry I don't understand the question, V, T are defined in "defining functions" section 4.3.1 (and section 1.1 Naming functions and variables) – David Carlisle Sep 28 '23 at 23:53
  • @Veak oh V comment is wrong it needs the backslash, as you clearly show in the code. (as cfr notes) – David Carlisle Sep 28 '23 at 23:54
  • The Token List Variable would be named `\feuds_teorema_parent_tl in this case. Qk ? – Veak Sep 29 '23 at 00:23
  • 1
    @Veak No, variables should have a l_ or g_ prefix, denoting whether they should be assigned values locally or globally. In your case, \l_feud_teorema_parent_tl. – egreg Sep 29 '23 at 08:31

0 Answers0