-
Notifications
You must be signed in to change notification settings - Fork 1
/
17_cast_conversion_functions.bal
69 lines (58 loc) · 1.12 KB
/
17_cast_conversion_functions.bal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import ballerina.lang.strings;
struct Employee {
string name;
int age;
string address;
}
struct Person {
string firstName;
string lastName;
string age;
string city;
}
struct AllTypes {
string stringV;
int intV;
json jsonV;
float floatV;
boolean booleanV;
any anyV;
}
struct StringType {
string a;
string b;
string c;
string d;
string e;
string f;
}
struct AnyType {
any a;
any b;
any c;
any d;
any e;
any f;
}
function main (string[] args) {
// Person p = {firstName: "John", lastName: "Doe", age: "30", city: "London"};
// Employee emp = {};
// AllTypes typesSource1 = {jsonV: {}};
// AllTypes typesSource2 = {jsonV: {}};
// StringType strTypesTarget1 = {};
// AnyType anyTypesTarget1 = {};
// AllTypes typesTarget1 = {jsonV: {}};
// AllTypes typesTarget2 = {jsonV: {}};
// string str1;
// any any1;
string x;
string y;
any category = "FF";
any catX = "ss";
transform {
}
}
function anyFunc(any t) (string) {
var temp,_ = (string) t;
return temp;
}