Re: Data conversion

2021-11-16 Thread jfondren via Digitalmars-d-learn
On Tuesday, 16 November 2021 at 19:18:50 UTC, pascal111 wrote: I used "to" keyword which "std.conv" includes for data conversions, but I think that there are some other ways for data conversions, or maybe there are common ways like casting, I hope to know about. For example, next program are us

Re: Data conversion

2021-11-16 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 16 November 2021 at 19:44:04 UTC, Ferhat Kurtulmuş wrote: On Tuesday, 16 November 2021 at 19:18:50 UTC, pascal111 wrote: [...] sscanf of C is an option where you cannot use to!T. However, it is a c library function, and it doesn't throw an exception on unexpected inputs. https:

Re: Data conversion

2021-11-16 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Tuesday, 16 November 2021 at 19:18:50 UTC, pascal111 wrote: I used "to" keyword which "std.conv" includes for data conversions, but I think that there are some other ways for data conversions, or maybe there are common ways like casting, I hope to know about. For example, next program are us

Data conversion

2021-11-16 Thread pascal111 via Digitalmars-d-learn
I used "to" keyword which "std.conv" includes for data conversions, but I think that there are some other ways for data conversions, or maybe there are common ways like casting, I hope to know about. For example, next program are using "to": // D programming language import std.stdio; import