VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



New type of INI

by Cody Rutkowski (4 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (6 Votes)

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

Rate New type of INI


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

Download this snippet    Add to My Saved Code

New type of INI Comments

No comments have been posted about New type of INI. Why not be the first to post a comment about New type of INI.

Post your comment

Subject:
Message:
0/1000 characters