There was an error while loading. Please reload this page.
using Nemerle; using System; using System.Console; [Record] class Employee { public Name : string; public StartDate : string; public mutable Salary : double; } def steve = Employee(name = "Steve", startDate = "01 Jan 2000", salary = 30000.0); def joe = Employee("Joe", "25 Dec 2001", 45000.0); def giveRaise(emp, increase) { emp.Salary *= 1.0 + increase; WriteLine($"$(emp.Name) : Salary = $(emp.Salary)"); } giveRaise(steve, 0.05); giveRaise(joe, 0.10);
Steve : Salary = 31500 Joe : Salary = 49500
[Copyright ©](Terms of use, legal notice)