I had a dream.

bazzi_h

Well-Known Member
Member
Joined
Jul 12, 2007
Messages
125
Trophies
0
Age
31
Location
Portmouth
XP
131
Country
Just wondering, what's harder to program in, Python or Visual Basic? How hard is it to convert from one to the other, for example how hard would it be to convert this into Python? (It's part of a Football (as in Soccer) database I created. The procedure is to delete a record from a file of footballers.)

CODEIf lblNumberOfRecord.Text > 1 Then

ÂÂÂÂÂÂÂÂÂÂÂÂtxtPlayerName.Text = "DELETE"
ÂÂÂÂÂÂÂÂÂÂÂÂSaveRecord()

ÂÂÂÂÂÂÂÂÂÂÂÂDim i As Integer
ÂÂÂÂÂÂÂÂÂÂÂÂDim NumOfNewRecords As Integer

ÂÂÂÂÂÂÂÂÂÂÂÂTempFilePath = CurDir() & "\Temp.dat"
ÂÂÂÂÂÂÂÂÂÂÂÂFileOpen(2, TempFilePath, OpenMode.Random, , , Len(PlayerRecord))

ÂÂÂÂÂÂÂÂÂÂÂÂNumOfNewRecords = 1

ÂÂÂÂÂÂÂÂÂÂÂÂFor i = 1 To lblNumberOfRecord.Text

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂFileGet(1, PlayerRecord, i)

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂIf Trim(PlayerRecord.Name) "DELETE" Then

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂFilePut(2, PlayerRecord, NumOfNewRecords)
ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂNumOfNewRecords = NumOfNewRecords + 1

ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂEnd If

ÂÂÂÂÂÂÂÂÂÂÂÂNext i

ÂÂÂÂÂÂÂÂÂÂÂÂFileClose(1)
ÂÂÂÂÂÂÂÂÂÂÂÂFileClose(2)

ÂÂÂÂÂÂÂÂÂÂÂÂKill(PlayerFilePath)
ÂÂÂÂÂÂÂÂÂÂÂÂFileCopy(TempFilePath, PlayerFilePath)
ÂÂÂÂÂÂÂÂÂÂÂÂKill(TempFilePath)

ÂÂÂÂÂÂÂÂÂÂÂÂFileOpen(1, PlayerFilePath, OpenMode.Random, , , Len(PlayerRecord))

ÂÂÂÂÂÂÂÂÂÂÂÂlblRecordNumber.Text = 1
ÂÂÂÂÂÂÂÂÂÂÂÂlblNumberOfRecord.Text = lblNumberOfRecord.Text - 1

ÂÂÂÂÂÂÂÂÂÂÂÂReadRecord()
ÂÂÂÂÂÂÂÂElse
ÂÂÂÂÂÂÂÂÂÂÂÂDeleteFile()
ÂÂÂÂÂÂÂÂEnd If
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://youtu.be/rMHTo4sAYKA?si=UTMogWR09JOPIPF_