Top "Literals" questions

a notation for representing fixed values in source code

Exact meaning of Function literal in JavaScript

In JavaScript there are both Object literals and function literals. Object literal: myObject = {myprop:"myValue"} Function literal: myFunction = function() { alert("…

javascript literals function-literal
How to return a string literal from a function

I am always confused about return a string literal or a string from a function. I was told that there …

c++ string literals return-type
Is there a clean way to specify character literals in Swift?

Swift seems to be trying to deprecate the notion of a string being composed of an array of atomic characters, …

swift character literals
Type of integer literals not int by default?

I just answered this question, which asked why iterating until 10 billion in a for loop takes so much longer (the …

c++ c overflow literals
Literals VS Immediate Operands

In the systems software course that I have this semester, we are being taught assemblers and other system software. While …

assembly literals systems-programming immediate-operand
Multiline string literal in Matlab?

Is there a multiline string literal syntax in Matlab or is it necessary to concatenate multiple lines? I found the …

string matlab multiline literals
Is order of a Ruby hash literal guaranteed?

Ruby, since v1.9, supports a deterministic order when looping through a hash; entries added first will be returned first. Does …

ruby loops sorting hash literals
Best practice for long string literals in Go

I've got a long string literal in Go: db.Exec("UPDATE mytable SET (I, Have, Lots, Of, Fields) = ('suchalongvalue', 'thisislongaswell', …

string go literals idioms
Make C floating point literals float (rather than double)

It is well known that in C, floating point literals (e.g. 1.23) have type double. As a consequence, any calculation …

c gcc floating-point literals
When should you use === vs ==, !== vs !=, etc.. in javascript?

Possible Duplicate: Javascript === vs == : Does it matter which “equal” operator I use? What are the differences between === vs == and !== vs !=? …

javascript equals literals