User Tools

Site Tools


strings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
strings [2018/08/29 06:47] wolfgangriedmannstrings [2018/10/06 05:09] (current) wolfgangriedmann
Line 35: Line 35:
  
 nValue := 123.45m  nValue := 123.45m
-cString := i"nValue: {nValue:######.0000}" // nValue: 123,4500+cString := i"nValue: {nValue:######.0000}" // nValue: 123,4500
 cString := i"nValue: {nValue:F6}" // nValue: 123,450000</code>  cString := i"nValue: {nValue:F6}" // nValue: 123,450000</code> 
 +
 +In this case (as in the use with ToString()), if you need to embed the parentheses ''{'' and ''}'' in your string, they need to be doubled as in this sample:
 +<code visualfoxpro>cConnection := i"Driver={{Microsoft access Driver (*.mdb)}};Dbq={cDatabaseFile};Uid=Admin;Pwd=;"</code>
  
 And only in the VO dialect, you need to prefix a char with the ''c'' prefix: And only in the VO dialect, you need to prefix a char with the ''c'' prefix:
 <code visualfoxpro>cChar := c'a'</code> <code visualfoxpro>cChar := c'a'</code>
 +
 +Please note that there is a major difference between C# and X#: in C# all strings are enhanced, and to make them normal, you must prefix them with the ''@'' character.
 +In X# all strings are normal, and to be enhanced, they need the ''e'' prefix.
  
  
strings.1535525259.txt.gz · Last modified: 2018/08/29 06:47 by wolfgangriedmann