Singular Manual: nameof

  | ### 5.1.99 nameof `Syntax:` `nameof (` expression `)` `Type:` string `Purpose:` returns the name of an expression as string. `Example:`
        int i=9;
        string s=nameof(i);
        s;
      ==> i
        nameof(s);
      ==> s
        nameof(i+1); //returns the empty string:
      ==>
        nameof(basering);
      ==> basering
        basering;
      ==>    ? `basering` is undefined
      ==>    ? error occurred in or before ./examples/nameof.sing line 7: `  baseri\
         ng;`
        ring r;
        nameof(basering);
      ==> r
See names; reservedName; typeof.

User manual for Singular version 4-1-1, 2018, generated by texi2html.