Data update

This commit is contained in:
Ingy dot Net 2024-04-19 16:56:29 -07:00
parent 0df55f9f24
commit aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions

View file

@ -0,0 +1,34 @@
Type Person
nombre As String
edad As Integer
End Type
Sub PrintPerson(p As Person)
Print "Name: "; p.nombre
Print "Age: "; p.edad
End Sub
Sub Serialize(p As Person, filename As String)
Open filename For Binary As #1
Put #1, , p.nombre
Put #1, , p.edad
Close #1
End Sub
Sub Deserialize(p As Person, filename As String)
Open filename For Binary As #1
Get #1, , p.nombre
Get #1, , p.edad
Close #1
End Sub
Dim pp As Person
pp.nombre = "Juan Hdez."
pp.edad = 52
Serialize(pp, "objects.dat")
Deserialize(pp, "objects.dat")
PrintPerson(pp)
Sleep