Home

Csprintf User`s Manual Software Industry

image

Contents

1. The problem this notation solves is one familiar to most computer science students and practitioners Often one must describe something that is a place holder Once very good example is describing something in BNF Backus Normal Form if you have something against Mr Naur or Backus Naur Form if you don t have anything against Mr Naur for a more complete discussion please see this Wikipedia entry Or another is where the author wants to indicate that a file name would be inserted into a particular position in a command line For example The student should type cat lt insert_a_file_name_here gt The problem isn t the insert_a file name here clause but rather telling the student NOT to type the left and right angle brackets Williams notation is to simply note the non entered entities at the end of the sentence enclosed by some meta character of its own So the above sentence would become The student should type cat lt insert_a file name_here gt lt gt The notation lt gt indicates the angle brackets are not typed and do not belong to the clause insert_a file name here You can also indicate that a punctuation or phrase is simply intended for emphasis and not to be considered part of the sentence itself For example The student should type cat lt insert_a file name _here gt lt gt The space between the characters is intentional so that the characters are more easily spotted This is called
2. values 0 alphabet values 1 digits values 2 Object aValue try System out println csf doSprintf s s is d characters long values System out prtinln csf doSprintf s s n is d characters long values catch CsprintfExceptions csfE csfE printStackTrace i Note two things The first is that new Object has only 3 elements The reason is that n is defined as not incrementing the option count That is the value returned by n apples to the next option processed This means that a n n must be followed by another option The value returned is defined in KNR as an int so a n must be followed by a option that is not a s nor a e actually e might make sense but only for values less than 256 so the author has simply disallowed it use a d if you are desperate Also a n may not be followed by a n Nor may a n be the final option in a format string Here are the three rules 1 n may not exist as the last option in a format string 2 n may not be followed by n with or without intervening characters 3 n may not be followed by c nor s with or without intervening characters 4 n must be followed by a numeric options of some kind usually a d i or Su Percent n is tricky The gcc compiler does not implement it The author found very little supporting documentation no examples and several reasons NOT to implement percent n Still n is included in Cspri
3. visual acuity and is something that the author wishes was more deeply considered by computer program language authors Sometimes a bracket brace or a parenthesis are indistinguishable in print or on a fading screen with glare Lastly in the notation the meta character does not have to be a slash It may be any character you wish to use Just use it in pairs Pseudo BNF As mentioned in the Williams Notation section BNF Backus Naur Form gives us an easy grammatical ordering descriptive notation Arcane to the un initiated pseudo BNF is simply a relaxation of the rules of BNF lt identifier gt declares a descriptive name A literal symbol is shown by itself and things enclosed in square brackets are optional There are several common ways to indicate a space character A known as a shelf character a subscripted logical and and for those of us who are familiar with keypunches there is the old IBM suggestion a small letter b with a slash through ith The pseudo BNF of lt name_of day of week gt lt month gt lt day gt s lt year gt should be familiar as a description of March 25 2009 or optionally Wednesday March 25 2009 Pseudo BNF is used throughout this document 1 Slash is the character More properly known as a virgule It is NOT the reverse virgule or Y This is another lunacy perpetrated by MS bigots A is a slash and a is a back slash Re Software Version X 1 0 0 Page 5 doc
4. 0 0 Page 11 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED System System out println Csprintf sprintf out println Csprintf sprintf Now force a plus sign mm System out println Csprintf sprintf System out println Csprintf sprintf System out println Csprintf sprintf System out println Csprintf sprintf System out println Csprintf sprintf System out println Csprintf sprintf System out println can stand alone sprintf can stand alone s new String Will output 1 234 567 890 1 234 567 890 0 1564 0 1564 0 1564 1 56e 01 1 56E 01 1 56e 01 1 56E 01 1 564e 01 1 564E 01 1 564e 01 1 564E 01 NSF 0 00e 00 0 000E 00 1 56E 01 1 56e 01 1 564e 01 1 564E 01 0 00e 00 0 000E 00 can stand alone Yes they can can stand Note The NSF is generated by the line containing not of base type double sprintf String Object String System out println Csprintf sprintf tt 00 1L System out println Csprintf sprintf 012 0 4269801473L System out println Csprintf sprintf 00 2814749767106561L Will output 001 777 777 777 777 777 777 7177 037 640 000 OO1 120 000 000 000 000 001 sprintf String Object String int System out println Csprintf sprintf 0x 0 x 1L 4 System out println Csprintf sprintf 0 x 42698014
5. the types c d e f 1 g o p s and x and the upper case equivalents as well as the following proprietary types Ot 1t 2t Csprintf also includes a proprietary flag The comma flag and t types are discussed in the Proprietary Inclusions section Exclusions The option n is not included in gcc This option returns the number of characters output so far to an argument although the argument count is not incremented What does all of this mean Consider the format string s n means we have written d characters n Now consider the following code fragment instruction int myStrLen 0 char myStr ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 printf s n means we have written d characters n myString myStrLen Re Software Version X 1 0 0 Page 6 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED The output should be ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 means we have written 36 characters Try this in gcc and you will get a Bus error If you investigate this option you will find that gcc does not implement n However Csprint does Try this code in Java make certain you have included com sigh jar in the CLASSPATH public void testPercentN String alphabet ABCDEFGHIJKLMNOPQRSTUVWXYZ String digits 1234567890 int aValue 0 Csprintf csf new Csprintf Object values new Object 3
6. 009 Software Industry amp General Hardware ALL RIGHTS RESERVED Software License Agreement By using this software you are agreeing to be bound by this license agreement If you do not agree to be bound by this license do not use this software Either delete software package completely or return the physical package including the distribution media in the original packaging unopened to the manufacturer at Software Industry amp General Hardware ATTN PKG RETURN 23125 Crooked Arrow Drive Wildomar CA USA 92595 This package may not be used or redistributed as part of a commercial release under this license Contact the owner of the software S I G H for fee information and commercial use licenses Contact information email to sales s i g h com Non commercial use license You may use and or redistribute the java package included in this distribution as is or as part of another software package owned by you as long as the following conditions are met 1 The new package cannot alter the functionality or use of the existing package The new package must allow the user access to the version method of the existing package The new package must allow the user access to the license method of the existing package This Software License Agreement in its entirety must be included in your documentation AI The following notice must be included in your documentation This software is COPYRIGHT O 2009 by Softwa
7. 73L 4 Re Software Version X 1 0 0 Page 12 doc re Csprintf20090423024030PDT 12 2e new Double 12 3E new Double S412 S412 S412 S412 12 2e new 12 3E new Yes they can 2e 2E 3e 3E Double Double Double Double Double Double new new new new alone Yes they can o oooo0o o 12 3e new Integer 1 0 0 15640000000007 15640000000007 15640000000007 15640000000007 0 0 wv wv wv Ne Ne Ne Ne Ne e Yes they can Integer is COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED System out println Csprintf sprintf 0x 2814749767106561L 4 Will output Oxffff ffff ffff ffff fe80 0001 0010 0000 0000 0001 sprintf String Object int System out println Csprintf sprintf 0x 2814749767106561L 4 Will output 0010 0000 0000 0001 Re Software Version X 1 0 0 Page 13 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED sprintf String Object Object anObject new Object 1 anObject 0 1L System out println sprintf Example of SIGH s sprintf 06ld anObject Will output Example of SIGH s sprintf 000001 sprintf String Object String int sprintf String Object String sprintf String Object int setNum
8. 7890 Will output for Babylon 5 fans 1 lt gt 234 lt gt 567 lt gt 890 set3 DigitSeparatorString char setFractionalSeparatorChar String setFractionalSeparatorChar char sprintf String Object System out println System out println System out println System out println System out println Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Lu 1234567890L Li 1234567890L 10g new Double 0 156400000007 10g new Double 0 156400000007 10g new Double 0 156400000007 mannna Pm r 0 15640000000007 0 15640000000007 System out println System out println System out println System out println System out println System out println System out println System out println System out println Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf Csprintf sprintf 12 2e new Double 12 2E new Double 12 2e new Double 0 15640000000007 12 2E new Double 0 15640000000007 12 3e new Double 0 15640000000007 Se 5 5 se No ose 12 3E new Double 0 15640000000007 12 3e new Double 0 15640000000007 12 3E new Double 0 15640000000007 12 3e new Integer 1 So ose IO IO IO ae ae ICAC II IC ICI IICA TZ uu vw TZ uu wv ws TZ uu vw Re Software Version X 1
9. COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Csprintf User s Manual by Software Industry amp General Hardware sales s i g h com document reference Csprintf200903131682730PDT Re Software Version X 1 0 0 Page 1 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Table of Contents WCAC SG i 2 A RS 3 TAC A a CAPA E NO O ATARI RSE 3 Commercial Us IOMA A A E ov neater A A de 4 Non commercial Use Tito rm ation nays Sh soteaap tance oaevesdahuasie es 4 What does BU CAIs Maio 4 Willams Nota E A AS A AA AS 5 ESO O A SPOS AACE HERE IS OF TUN O a ERIS Rea 5 Notes Arid Abbreviation Seuseut arre a e n a a a a d aea a ai 6 A EE he teh od A A O A a a E 6 A a Aone a O IN 6 A O A ANA 6 JEDLE RIT nE A EAEE A EEE 6 CI IMSS rra dll 7 Proprietary IMCIUSI OMS AOS AS AA A AR A S 8 A e o do end al 8 LN Ata 8 Methods tacto desa 10 A AO 11 Cys Java And TYPES SS A A 15 CACA a A MM ed ti ae 16 A A o E CRIA Gaia ae a beans E a 16 Common NASCORCEPON Sad de Ls dd Os 16 A A OR 17 PT ORS NT 18 PLU POE Ecce ch dace e O Dep cca cacao aac A Posie ain vey ded ad A N E a Hod aca sabe aes 18 IRECOUNSE EEE ET a ls ter aa lava tas R cobol acia 18 Re Software Version X 1 0 0 Page 2 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Legalese License COPYRIGHT 2
10. and two getter methods These encapsulate two properties named formatString a Java String type and longTimeInMilliseconds a Java long type Instantiation is via the constructor which requires two parameters String and long The getters are available to allow the user to test the current values being used The two getter methods are getFormatString and getTimeInMilliseconds these two methods should be self explanatory TimeFormatString String long takesastrftime format string as the String parameter and a long 64 bit value as the second parameter The String parameter values for the strftime format string can be found in the CTime User s Manual The long parameter represents a time value in milliseconds the user wants to apply to the format string of the first parameter A user has then two ways to include a date time string in the desired output One is to write a separate strftime call and save that string value The other is by using the TimeFormatString object and including it as the object to a t type in a call to sprintf As an example supposed you want todays date and time in your output string In Csprintf you could do the following code 1 Object theValues new Object 1 Calendar aCalendar Calendar getInstance TimeFormatString tfs new TimeFormatStirng c aCalendar getTimeInMills theValues 0 Object tfs System out println Csprintf sprintf Todays date is theValu
11. berOfDigitsToSeparate int Csprintf csf new Csprintf int oldValue csf getNumberOfDigitsToSeparate csf setNumberOfDigitsToSeparate 4 csf set3DigitSeparatorChar System out println Previous number of digits to separate oldValue tempObj 0 new Long 1L System out println csf doSprintf x tempObj tempObj 0 new Short short 23130 System out println csf doSprintf 0 x tempObj System out println Previous number of digits to separate csf setNumberOfDigitsToSeparate oldValue csf setLocalLocaleForBothSeparators Will output Previous number of digits to separate 3 Oxffff ff ffff ffff 5a5a Previous number of digits to separate 4 getNumberOfDigitsToSeparate int widget Csprintf getNumberOfDigitsToSeparate get3 DigitSeparatorString getFractionalSeparatorString set3 DigitSeparatorChar String setFractionalSeparatorChar String Re Software Version X 1 0 0 Page 14 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED C vs Java And Types Java has the following integral types and values 128 to 127 inclusive byte 3 8 bits 32768 to 32767 inclusive short 16 bits ER 2147483648 to 2147483647 inclusive in 32 bits i 9223372036854775808 to 9223372036854775807 inclusive ong 64 bits u0000 to uffff inc
12. es Using Ctime you could do the following System out println CTime strftime Today s date is c Re Software Version X 1 0 0 Page 8 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED As you can see using CTime can be easier if all you are doing is displaying date time But if you are displaying other values along with the date time as most people do then you may do so from Csprintf Methods Csprintf Use to instantiate an instance of Csprintf This method establishes the local locale grouping characters and grouping size doSprintf String Object Non static call used with an instantiated object String is the c programming language equivalent format string Object is an vector of object values to apply to the format string set3DigitSeparatorString String This method allows the programmer to set a new separator string It returns the old separator string value so you can save and restore the previous separator string set3DigitSeparatorString char Same as above except allowing the programmer the convenience of using a single character instead of a string setFractionalSeparatorChar String Allows the programmer to specify the fractional separator string in floating point numbers North America typically uses a period for this character and Europe typically uses a comma setFractionalSeparat
13. ialTestValue new Object 1 aTestValue 0 new Short short 1 System out println Csprintf sprintf Su aTestValue specialTestValues 0 new Float 0 0 specialTestValues 1 new Double 0 0 System out println csf doSprintf zero float f double f testValues Will output 01000 0777 0400 01000 0777 0400 65535 zero float 0 000000 double 0 000000 Re Software Version X 1 0 0 Page 10 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED doSprintf String Object Object testValues new Object 3 Csprintf csf new Csprintf testValues 0 512 testValues 1 511 testValues 2 256 System out println csf doSprintf 0 0 0 0 0 0 testValues System out println csf doSprintf Sto o Sito testValues Object aTestValue new Object 1 aTestValue 0 new Short short 1 System out println Csprintf sprintf u aTestValue testValues 0 new Float 0 0 testValues 1 new Double 0 0 System out println csf doSprintf zero float f double f testValues Y Will output 01000 0777 0400 01000 0777 0400 65535 zero float 0 000000 double 0 000000 set3DigitSeparatorString String Csprintf csf new Csprintf String oldcsf set3DigitSeparatorString lt gt System out println csf sprintf Lu 123456
14. lternate form flag of 4 KNR also indicates that whether equivalent or the e equivalent type is used should be determined by the esthetics of the display Csprint does a fairly reasonable job of determining the changeover point There is no fuzzy logic control of the changeover point Common Misconceptions The 1 letter lowercase el attribute modifies the format string so that the value is displayed as a long value It does not change the value itself This doesn t matter in the c programming language since a long and an int are the same length 32 bits So the following code in c would produce the following output include lt stdio h gt include lt stdlib h gt int main int argc char argv long widget 1L int wodget 1 printf u Su n sizeof widget sizeof wodget printf u Suln widget wodget return 0 44 4294967295 4294967295 Both a long and an int are 4 bytes long 32 bits and each has the same unsigned maximum value of 4 294 967 295 Java is different An int is 32 bits and a long is 64 bits long Csprint follows the Java values and the c programming language s philosophy of the 1 modifier when applied to values Re Software Version X 1 0 0 Page 16 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED The following code public class example0 public exam
15. lusive that is from 0 to 65535 char 16 bits Java has the following floating point types and values for float and double Parameter float float extended exponent double double extended exponent N 24 24 53 53 K 8 gt 11 11 215 Ene 127 gt 1023 1023 gt 16383 Enin 126 lt 1022 1022 lt 16382 If you are a c programmer you may be struck by the fact that there is no unsigned except for char This is correct So Csprintf must fake an unsigned value when requested C99 has long long types and more This is true Java does not How you get your c data into a Java value via JNI is up to you Once you do you may apply the attributes of unsigned long and short as you wish Csprintf will do its best to evaluate this according to Java types and return a string representing what was requested There are of course caveats The best answer is to try a short example of what you are trying to do and see what the output looks like Re Software Version X 1 0 0 Page 15 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Caveats 9 The formatting string g is unusual to say the least KNR indicates that g differs slightly from fixed point notation in that insignificant zeroes to the right of the decimal point are not included and that the decimal point is not included on whole numbers All of this changes if you use the a
16. ntf C99 Inclusions Csprintf follows the KNR description of printf sprintf and avoids the C99 extensions Especially avoided are the manufacturer specific extensions DWORD etc Re Software Version X 1 0 0 Page 7 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Proprietary Inclusions Flags The proprietary addition of the comma allows the programmer to include a separator defaulted to the local locale In North America this means a number such as 1234567890 would be returned as 1 234 567 890 In some places in the world the number would be returned as 1 234 567 890 see also Methods chapter for varying the separator count and the separator character Types Csprintf adds the following additional type st In KNR time functions are handled in the standard c library lt time h gt and include a specific function strftime and a completely new set of format strings to format the date time strings The most probable reason for the new set of format strings in strftime is the fact that types are made up of a percent sign and a single letter Even with 26 letters in the alphabet you run out quickly As a result c in sprintf and c in strftime mean two different things The question is how to combine the two Csprintf and CTime combine these two format string characters via a class named TimeFormatString TimeFormatString consists of a constructor
17. orChar char Same as above except allowing the programmer the convenience of using a single character instead of a string sprintf String Object Static call where the first String is the c programming language equivalent format string Object is a single object value to apply to the format string sprintf String Object String Same as above except that the second String is the separator string to apply to this static call only sprintf String Object String int Same as above except that the int is the number of characters to group together instead of using the local locale default for this static call only sprintf String Object int Static call where the first String is the c programming language equivalent format string Object is a single object value to apply to the format string and int is the number of characters to group together instead of using the local locale default for this static call only sprintf String Object Static call used with an instantiated object String is the c programming language equivalent format string Object is a vector of object values to apply to the format string sprintf String Object String int Same as above except the second String is the separator string and the int is the number of characters to group together instead of using the local locale default for this static call only sprintf String Object String Same as above except the second St
18. ple0 public static void main String argv try System out println Csprintf sprintf lu new Byte byte System out println Csprintf sprintf lu new Short short System out println Csprintf sprintf lu new Integer int System out println Csprintf sprintf lu new Long long catch CsprintfExceptions csfE csfE printStackTrace Will output 255 65535 4294967295 18446744073709551615 The long modifier should prefix the u flag not suffix the u flag For example sul as a format string will produce lt value gt l where as 1u will produce lt value_as_unsigned_long gt lt gt The best thing to do is to TRY the format string and see what you get as output If you disagree with the results then see what the gcc compiler or g compiler output is You may be surprised If you are convinced your display is correct then see the Support chapter and send it in for an evaluation Exceptions Csprintf throws the following exceptions e CsprintfExceptions o Consisting of the following possible exception characteristics UNKNOWN EXCEPTION INCORRECT FORMAT STRING INCORRECT VALUE FOR FORMAT STRING INCORRECT RETURN VALUE TYPE INCORRECT VALUES FOR ASTERISK FORMAT INVALID PERCENT N COUNT OR LOCATION e ArrayOutOfBoundsException e NullPointerException If you encounter one of these please send the stack trace to info s i g h com along
19. re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Notes And Abbreviations KNR The c Programming Language reference by Brian W Kernighan and Dennis M Ritchie published by Prentice Hall Wikipedia http Awww wikipedia com encyclopedia ISO The Internal Standards Organization IEEE The Institute of Electrical and Electronics Engineers Overview Csprintf is a java equivalent of most of the c programming language functionality found in sprintf There are additionally some useful proprietary additions that are explained later in this manual In general the rules are governed first by sprintf in KNR and secondly as defined in ISO C99 standard Basic functionality can be discerned from the C99 reference to printf found on Wikipedia at http en wikipedia org wiki Printf See the KNR and C99 inclusions sections of this manual for more specific information This manual assumes the reader is familiar and comfortable with the c programming language statements printf sprintf and their use KNR Inclusions In the c programming language the statement printf consists of the following general syntax printf lt format_place_holder gt lt variable identifier gt Where means zero or more In general a lt format_place_holder gt has the following syntax parameter flags width precision length type Csprintf accepts and processes
20. re Industry amp General Hardware ALL RIGHTS reserved This software package includes and uses the Csprintf jar package developed by Software Industry amp General Hardware S I G H For more information on this or any other software package from S I G H email info s i g h com This software may not be included in a commercial package Re Software Version X 1 0 0 Page 3 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED This package may be distributed via a network THIS SOFTWARE IS PROVIDED BY SOFTWARE INDUSTRY amp GENERAL HARDWARE AS IS WITHOUT WARRANTY OF ANY KIND EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT OF THIRD PARTY RIGHTS IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE DATA OR PROFITS WHETHER IN AN ACTION OF CONTRACT NEGLIGENCE OR OTHER TORTIOUS ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE USE OF THE SOFTWARE CONSTITUTES AGREEMENT TO CONFORM WITH THIS LICENSE AND TO BE BOUND BY THE LEGAL CONSEQUENCES OF VIOLATING THIS LICENSE Commercial Use Information For information on commercial use of this software contact Software Industry amp General Hardwa
21. re at sales s i g h com or write for information to Software Industry amp General Hardware 23125 Crooked Arrow Drive Wildomar CA USA 92595 Non commercial Use Information Non commercial use is governed by the License above What does all this mean If you are using the software for non commercial use then have fun learning programming writing that program to help others or anything you are not intending to sell for profit Have fun and enjoy the software Use it to your hearts content If you are planning on using this software as part of a package you are going to sell you may not do so without contacting the owner of the software and obtaining a license from the Software Owner If you are planning on distributing this software as part of a non profit or not for profit venture you may do so with impunity If you are going to distribute this software as part of a software collection for which you are not charging except for a nominal fee for the media and or shipping no more than 10 US you may do so If you are going to distribute this software as part of a software collection you are going to sell for profit you may not do so Re Software Version X 1 0 0 Page 4 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED Williams Notation This notation was invented by the author to help solve some of the drudgery of note taking in Computer Science classes
22. ring is the separator string sprintf String Object int Same as above except the int is the number of characters to Re Software Version X 1 0 0 Page 9 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED group together instead of using the local locale default for this static call only setNumberOfDigitsToSeparate int For non static calls sets the number of characters to group together before a separator string is applied Returns the previous value getNumberOfDigitsToSeparate Returns the current number of digits that are grouped together before a separator string is inserted into the numeric string get3DigitSeparatorString Returns the current grouping separator string getFractionalSeparatorString Returns the current separator string for the fractional separator set3DigitSeparatorChar String Sets the grouping separator string and returns the current grouping separator string setFractionalSeparatorChar String Sets the fractional separator string and returns the current separator string Code Examples Csprintf Object testValues new Object 3 Csprintf csf new Csprintf testValues 0 512 testValues 1 511 testValues 2 256 System out println csf doSprintf 0 0 0 0 0 0 testValues System out println csf doSprintf Sto Sto Sito testValues Object anotherSpec
23. rs Recourse Software Industry amp General Hardware attempts to provide the most bug free software it can no project is completely bug free or feature complete We will listen to and collect suggestions but implementation of the those suggestions is solely at the discretion of Software Industry amp General Hardware This software is supplied AS IS You use this software at your own risk Software Industry amp General Hardware is not responsible for perceived or actual loss of data time nor anything else whether to you or your customers users There is no recourse You re using this for free The commercial version is governed by a different set of rules Re Software Version X 1 0 0 Page 18 doc re Csprintf20090423024030PDT
24. with the items listed in the Support chapter All exceptions and any output from them are written to the System err stream Csprintf is designed mostly for developers converting c code to Java You don t need a production log Re Software Version X 1 0 0 Page 17 doc re Csprintf20090423024030PDT COPYRIGHT 2009 Software Industry amp General Hardware ALL RIGHTS RESERVED nor a file Just redirect the System err output to a file if you need to do so If you catch the exception you will need to do your own call to printStackTrace CsprintfExceptions does not do so in the class Errors If Csprintf cannot parse the format string or if the value is not represented in the base type of the format string Csprintf returns NSF NSF stands for No Such Formatting Since numbers are converted to strings and the strings are then manipulated there is a possibility that Csprint could throw a Java ArrayOutOfBoundsException please see the Support chapter if you experience this Support If you believe that Csprint is displaying an incorrect value send the following to info s i g h com e The actual numeric value s you used with Csprintf The format string value you used with Csprintf e The actual code line of the call to Csprintf just one or two lines please we don t need or want the entire project e What you believe Csprint should have displayed as the result of the formatting string You should get a response within 48 hou

Download Pdf Manuals

image

Related Search

Related Contents

Télécharger le mémoire  Avaya Configuring IP Utilities User's Manual  藝芋茎タルホームターミナルリモコンの ボタンを押してください。  Samsung SGH-E900 Felhasználói kézikönyv  Manuel d`installation  SVA VR3208W User's Manual  2 4 5 6 7 8 9 10 11 12 13 14 16 1 SECTION 12 M  Brasforma SBR_3.6  ひかりone ご利用ガイド  大阪ガス 取扱説明書 2ー-日フロ型  

Copyright © All rights reserved.
Failed to retrieve file