printf - change display format for all string variables to as short as possible -


After compress in my data, I have the storage type str4 > Or str1 and format % 9s . I would like to return all of them to the default display format, which should be str # for help dformat report % # s . Is there a quick way to do this?

This is my best estimate:

  DS, is (type string), foreach v variche `v (variants) v) '{format} v'} < / Code>  

This does not work because, instead of redefining the default value with this command, the format function displays only the format.


A copy presenter example:

  clear input str50 mystr "b" "one" end compress format format myst   

This is the situation I had to face. I'm not sure that this applies beyond the formatted variables (Roberto suspects that it is not, see comments.)

Appendix . My goal here was to browse - simplifying my data It seems that format is awarded in the browser (for the length of one for% 1s Cut, to say), while while printing on the console it is overridden with the actual length of the string.

I wonder if you are surprised that your syntax format command) actually just displays the format, as is the document. Incidentally, you do not have to do this because the format takes varlist as argument:

 . clear . Set obes 1 was 0, now 1 in a BC {2 gene `t '=" `t" "3.} In advance t. format ABC variable name display format ------------- ----------------% 9sB% 9cc% 9s ------ ----------------- Besides, I think that you just need one line here, which is something like this    Format ABC% 1 s   

or

  format a BC% 1s   

to justify the signals Do not toon the displayed string Because they do not match the string display format; It can shorten the stars well because they do not have space to show, but the above display format for variables (I'm naturally opening for counter-examples)

EDIT: The following devices can help in silently 'foreach v' {length = length (`V ') in Su' length (` varlist '), Su In order to change format `V '%

  gene length = 0 DS, is (type string) drop length of` R (max)'    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -