- //
prints 42
return 0; }
public class Shadow {
private int myIntVar = 0;
public void shadowThe
Var() { //
Since it has the same name as
above object instance...
- Main(string[] args) { Func<Func<
int,
int>, Func<
int,
int>>
twice = f => x => f(f(x)); Func<
int,
int>
plusThree = i => i + 3;
var g = twice(plusThree); Console...
-
while loops will
calculate the
factorial of the
number 5:
var counter:
int = 5;
var factorial:
int = 1;
while (counter > 1) {
factorial *= counter; counter--;...
-
static int CompareFunction(
int x,
int y) {
return x - y; }
public static void Main() {
var items = new List<
int> { 4, 3, 1, 2 }; Comparison<
int> del =...
- *
myDictionary2 = [NSDictionary dictionaryWithObjectsAndKeys:object1, key1, object2, key2, nil];
NSNumber *
myNumber = [NSNumber numberWith
Int:
myInt];...
- principle.
var myChars = new char[] {'A', 'Ö'}; // or char[]
myChars = new char[] {'A', 'Ö'};
var myNums = new List<
int>(); // or List<
int>
myNums = new...
-
variable declarations: #define DEFINE_NAME_
VAR(id, name, ...)
int name; FOR_LIST_OF_VARIABLES( DEFINE_NAME_
VAR ) or
declare an enumeration: #define DEFINE_ENUMERATION(id...
-
using callAsFunction.
struct CallableStruct {
var value:
Int func callAsFunction(_ number:
Int, scale:
Int) { print(scale * (number + value)) } } let callable...
-
var ( X ) = lim α → 0
var ( X ) = lim β → ∞
var ( X ) = lim α → ∞
var ( X ) = lim ν → ∞
var ( X ) = lim μ → 0
var ( X ) = lim μ → 1
var ...
-
convert it to an
int type //
before returning.
return int(id), nil } The
placeholder parameter syntax differs depending on your database.
MySQL, SQL Server...