Presentation is loading. Please wait.

Presentation is loading. Please wait.

Grammatik, sprog og parsing Relationerne imellem sprog If While Foreach Try Catch 1Rasmus D. Lehrmann.

Similar presentations


Presentation on theme: "Grammatik, sprog og parsing Relationerne imellem sprog If While Foreach Try Catch 1Rasmus D. Lehrmann."— Presentation transcript:

1 Grammatik, sprog og parsing Relationerne imellem sprog If While Foreach Try Catch 1Rasmus D. Lehrmann

2 Relationerne imellem sprog 2Rasmus D. Lehrmann

3 Syntax ”The man drinks the beer that is cold” Syntax og mening korrekt The man drink the beer that are coldly.” Syntax forkert mening korekt ”The beer drinks the man, who is cold” Syntax koregt mening forkert Rasmus D. Lehrmann3

4 If If (condition) Then (statements) Else (statements) End If 4Rasmus D. Lehrmann

5 While int n = 1; while (n <6) { Console.WriteLine("Current value of n is {0}", n); n++; } 5Rasmus D. Lehrmann

6 Foreach class ForEachTest { static void Main(string[] args) { int[] fibarray = new int[] { 0, 1, 2, 3, 5, 8, 13 }; foreach (int i in fibarray) { System.Console.WriteLine(i); } Rasmus D. Lehrmann6

7 Try Catch int x; try { x = 123; } catch { } Console.Write(x); Rasmus D. Lehrmann7


Download ppt "Grammatik, sprog og parsing Relationerne imellem sprog If While Foreach Try Catch 1Rasmus D. Lehrmann."

Similar presentations


Ads by Google