Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1031334 // printVars_struct - print a bunch of vars as structures

JavaX fragment (include)

1  
// Use like this: printVars_struct(+x, +y);
2  
// Or: printVars_struct("bla", +x);
3  
// Or: printVars_struct bla(, +x);
4  
svoid mapMethodLike printVars_struct(O... params) {
5  
  S s = "";
6  
  if (odd(l(params))) {
7  
    s = str(first(params));
8  
    if (endsWithLetter(s)) s += ": ";
9  
    params = dropFirst(params);
10  
  }
11  
  print(s + renderVars(params));
12  
}

Author comment

Began life as a copy of #1005990

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031334
Snippet name: printVars_struct - print a bunch of vars as structures
Eternal ID of this version: #1031334/2
Text MD5: 081382bb630072b0c6b60150b31ef524
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-05 09:09:49
Source code size: 350 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 186 / 224
Version history: 1 change(s)
Referenced in: [show references]