RosettaCodeData/Task/History-variables/AutoHotkey/history-variables.ahk
2014-04-02 16:56:35 +00:00

15 lines
243 B
AutoHotkey

HV := new HistoryVariable
HV.var := 1
HV.var := 2
HV.var := "Latest value"
Msgbox % HV.var "`n" HV[2] "`n" HV[3]
class HistoryVariable {
__Set(aName, aValue) {
this.Insert(1,aValue)
Return aValue
}
__Get(aName) {
Return this[1]
}
}