Top "Type-conversion" questions

Type conversion is the way of implicitly or explicitly changing an entity of one data type into another.

Cast/convert int to rune in Go

Assuming I have an int64 variable (or other integer size) representing a valid unicode code-point, and I want to convert …

casting go type-conversion rune
Converting integer to string in Julia

I want to convert an integer to a string in Julia. When I try: a = 9500 b = convert(String,a) I …

string floating-point type-conversion julia
What is the difference between casting and conversion?

Eric Lippert's comments in this question have left me thoroughly confused. What is the difference between casting and conversion in …

c# type-conversion casting
Can I type assert a slice of interface values?

I am trying to type assert from a []Node, to []Symbol. In my code, Symbol implements the Node interface. Here …

interface type-conversion go type-assertion
Is addition of byte converts to int because of java language rules or because of jvm?

byte a = 1; byte b = 1; byte c = a + b; Throws error: possible loss of precision byte subt = a_s - a_…

java type-conversion byte operation type-promotion
postgresql cast numeric to date and format

I have my date field as numeric in postgresql and the values in the date are like 1401710352000 and when I …

postgresql type-conversion to-date
how to display number value in words

Q. Display the number value in Words and output should look like this SAL In_Words --------- ----------------------------------------------------- 800 eight hundred 1600 …

sql oracle type-conversion to-date to-char
What is guaranteed about the size of a function pointer?

In C, I need to know the size of a struct, which has function pointers in it. Can I be …

c pointers type-conversion function-pointers sizeof
Why can't I reinterpret_cast uint to int?

Here's what I want to do: const int64_t randomIntNumber = reinterpret_cast<int64_t> (randomUintNumber); Where randomUintNumber is …

c++ type-conversion reinterpret-cast
Convert Option to Either in Scala

Suppose I need to convert Option[Int] to Either[String, Int] in Scala. I'd like to do it like this: …

scala type-conversion option either