Advertisement
6_2008-2009 Files/ File Controls/ Input/ Output #202904

New type of INI

A different kind of INI because I don't like the ini's that are so easy to use! example: @ Header1, Value1 @ Header2, Value2 @ Header3, Value3 @ Header4, Value4

AI

AI-sammanfattning: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Källkod
original-source
<PRE>
Public Function ReadFile(Header$, Filename$)
Dim FF: FF = FreeFile
Dim Data$
Open Filename$ For Binary As #FF
  Data$ = Input(LOF(FF), FF)
Close #FF
Dim lines: lines = Split(Data$, vbCrLf)
For i = 0 To UBound(lines)
  If UCase(Left(lines(i), Len("@ " & Header & ","))) = UCase("@ " & Header & ",") Then
    ReadFile = Mid(lines(i), Len("@ " & Header & ",") + 1)
    ReadFile = LTrim(ReadFile)
  End If
Next i
End Function
</PRE>
Originalkommentarer (3)
Återställd från Wayback Machine