MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / addData

Method addData

PyBasic/basicdata.py:45–63  ·  view source on GitHub ↗

Adds the supplied token list to the program's DATA store. The first token should be the line number. If a token list with the same line number already exists, this is replaced. line_number: Basic program line number of DATA statement fIndex:

(self,line_number,fIndex)

Source from the content-addressed store, hash-verified

43 del self.__data[line_number]
44
45 def addData(self,line_number,fIndex):
46 """
47 Adds the supplied token list
48 to the program's DATA store. The first token should
49 be the line number. If a token list with the
50 same line number already exists, this is
51 replaced.
52
53 line_number: Basic program line number of DATA statement
54 fIndex: if >= 0: location in loaded program file of statment
55 if < 0: Location in temporary basic workfile
56
57 """
58
59 try:
60 self.__data[line_number] = fIndex
61
62 except TypeError as err:
63 raise TypeError("Invalid line number: " + str(err))
64
65 def readData(self,read_line_number,infile,tmpfile):
66

Callers 2

loadMethod · 0.80
add_stmtMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected