Video: youtu.be/amAQvb2a3Og
#FreePascal #LazarusIDE #GUIprogramming #PascalTutorial #DictionaryApp #StringList
Video: youtu.be/amAQvb2a3Og
#FreePascal #LazarusIDE #GUIprogramming #PascalTutorial #DictionaryApp #StringList
2) type specific implementations, ie a StringList and a NumberList class.
Option one is runtime typing but with the client having to do a bunch of ceremony. Option two means a bunch more code and headache.
2) type specific implementations, ie a StringList and a NumberList class.
Option one is runtime typing but with the client having to do a bunch of ceremony. Option two means a bunch more code and headache.
I put in an extra two days effort to fix up the non-trivial data structures I've been using to implement my lexer. This includes utf8 string / stringlist to be honest. It also includes specialized lookup tables.
If all goes well, I can hopefully get my lexer repo committed by tomorrow.
I put in an extra two days effort to fix up the non-trivial data structures I've been using to implement my lexer. This includes utf8 string / stringlist to be honest. It also includes specialized lookup tables.
If all goes well, I can hopefully get my lexer repo committed by tomorrow.
func (a StringList) Len() int
에서 호출시에는 []string을 StringList로 캐스팅(알맹이) 하지만 함수 선언에는 []string 타입을 직접 사용하지 않는다.(껍데기)
func (a StringList) Len() int
에서 호출시에는 []string을 StringList로 캐스팅(알맹이) 하지만 함수 선언에는 []string 타입을 직접 사용하지 않는다.(껍데기)
class StringList:
def __init__(self, d):
self.d = d
def __setitem__(self, i, v):
self.d[i] = str(v)
sl = StringList(['2', '4', '6', '8'])
sl[2] = 99
sl.d
['2', '4', '99', '8']
class StringList:
def __init__(self, d):
self.d = d
def __setitem__(self, i, v):
self.d[i] = str(v)
sl = StringList(['2', '4', '6', '8'])
sl[2] = 99
sl.d
['2', '4', '99', '8']