fbpx
Welcome, Guest
Username: Password: Remember me
Share your code snippets, screen shots etc. here
  • Page:
  • 1
  • 2

TOPIC: Interpolated Strings

Interpolated Strings 7 months 3 weeks ago #21

  wriedmann's Avatar wriedmann Offline Posts: 1491
Hi,

this is really great:
local nValue as decimal
nValue := 123.45m	
Console.WriteLine( i"nValue: {nValue:######.0000}" ) // nValue: 123,4500
Console.WriteLine( i"nValue {nValue:F6}" )  // nValue: 123,450000

even if the .NET formatting strings are less powerful than the pictures we know from VO.

Wolfgang

P.S. I have also adjusted the wiki: docs.xsharp.it/doku.php?id=strings
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Interpolated Strings 7 months 3 weeks ago #22

  MathiasHakansson's Avatar MathiasHakansson Offline Posts: 42
Yes, Wolfgang, it's really convenient.

I find the .net formatting strings is less useful for numbers than VO's when it comes to common numbers and amounts. The formatting in .net however covers a wider field (like hex-values). I think the date formatting in .net is easier with all the standard formats that are ready to use.

docs.microsoft.com/en-us/dotnet/standard...meric-format-strings

/Mathias

Please Log in or Create an account to join the conversation.

Interpolated Strings 7 months 3 weeks ago #23

  wriedmann's Avatar wriedmann Offline Posts: 1491
Hi Mathias,

yes, I find the options for numeric less useful than the picture strings in VO. And after all, input of numerics is very important in any business application.

But I see not why the picture clauses in the X# runtime could not be extended by the development team when we need that.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Last edit: by wriedmann.
  • Page:
  • 1
  • 2