format specifiers in format string param. 
Author Message
 format specifiers in format string param.

I use the format specifier %.8e to format a single precision 2D array into
an ASCII file, and i wanted to know what other types of format specifiers
i can use. But the help or the manual does not tell which types are valid.
Where can i find out? -or can anyone tell me?
(i use labview 6.i)

sincerely
/lodahl


% http://www.*-*-*.com/ ~lodahl ; RISC group 850;Room A6-118;
% RF Integrated Systems & Circuits (RISC);Aalborg University;
% Frederik Bajers Vej 7;DK-9220 Aalborg ?;Denmark
clc;s=zeros(1,52);c=[+'a':+'z',' '];f=5;a=clock;a=fix(f*a(6));
while(1)while(1)b=clock;b=fix(f*b(6));if(b~=a)break,end,end,a=b;
str=('my name is brian and i am just another matlab hacker');
k=find(s~=str);n=length(k);if~n,break,end;x=c(ceil(27*rand(1,n)));
s(k)=x;fprintf('\r%s',s);end;fprintf('\n');clear%;clc;str



Sun, 02 Jan 2005 23:40:48 GMT  
 format specifiers in format string param.
LabVIEW help has quite a bit on format specifiers. If you go to the
help index and type format specifiers, you'll find examples, syntax,
and syntax elements that should help you get started.


Mon, 03 Jan 2005 00:24:11 GMT  
 format specifiers in format string param.
Yes, this is a big bug with the documentation.  Just about everywhere
you look in LabVIEW help, it refers you to the LabVIEW manual to find
the format specifiers, yet they aren't there.

Having gone down this road many a time, I will make the following
recommendation:

Go to Help>>Index
Type in "formatting"
Select "specifier in strings" under "Formatting"

This will produce the Format Specifier Table

There are examples under "Format Specifier Examples" as well.



Mon, 03 Jan 2005 00:27:25 GMT  
 format specifiers in format string param.
Not being a C programmer (the format specifiers were originally a C
tool that LabVIEW inherited), the way that I learned them was to use
the <i>Edit Format String</i> dialog that is available by
right-clicking on the <b>Format Into String</b> function and the
<i>Edit Scan String</i> dialog that is available by right-clicking on
the <b>Scan From String</b> function.  You can make your formatting
choices and see the resulting format specifier.

But remember... reverse engineering is a violation of section 3 of
your LabVIEW software license agreement ;-)

-Jim



Mon, 03 Jan 2005 01:42:51 GMT  
 format specifiers in format string param.
Jim,

Oops, I forgot about this little hidden feature.  Thanks for
recommending this.  I would have never remembered, and I just used the
darn thing the other day.

I can't remember where I saw the answer, but I was looking for a way
to convert iterations of a loop into multiple digit numbers with
leading zeroes.  I ended up in the Edit String Scan, and that may have
been where I found it.

Great tip!



Mon, 03 Jan 2005 02:12:23 GMT  
 format specifiers in format string param.
To this day, when creating format specifiers for functions like
<B>Array to Spreadsheet String</B>, I will still open those dialogs to
make sure I am using the right format specifier.


Mon, 03 Jan 2005 02:46:45 GMT  
 format specifiers in format string param.
This problem has been corrected in the LabVIEW 6.1 Help, which you can
access by selecting <b>Help?VI, Function, & How-To Help</b>.


Wed, 12 Jan 2005 02:51:10 GMT  
 format specifiers in format string param.
Kelly,

It would also be useful for NI to make the "Edit Format String" dialog
tool available from all functions or VIs that use format strings; for
example, the <b>Array to Spreadsheet String</b> and <b>Spreadsheet
String to Array</b> functions, and the <b>Write to Spreadsheet
File.vi</b> and <b>Read from Spreadsheet File.vi</b> VIs.  Yes, it is
probably tricky for NI to add it to VI's that use format strings, but
it should be a piece of cake to add it to functions.

-Jim



Wed, 12 Jan 2005 03:22:42 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Problem with pack and Hh format specifiers

2. $display format specifiers

3. variable in READ format specifier (GNU77)

4. FORMAT specifiers on the fly?

5. creating format specifiers "on the fly"

6. FORMAT specifier to use delimiter other than blank

7. Zero width format specifiers for write statements

8. ?Expanded format specifiers for PyString_Format

9. FORMAT specifiers in g77

10. using a variable as the conversion specifier in [format]

11. Variable repeat count specifier for FORMAT statments

12. Write to file: need a variable format specifier

 

 
Powered by phpBB® Forum Software