gambas-source-code/app/examples/Drawing/Painting/.src/MMakeSourceFile.module
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +00:00

32 lines
722 B
Text

' Gambas module file
Private Const ROOT As String = "~/gambas/3.0/trunk/examples/examples/Drawing/Painting/"
Public Sub Main()
Dim hFile As File
Dim sLine As String
Dim sName As String
Dim sSource As String
hFile = Open ROOT &/ ".src/FMain.class"
While Not Eof(hFile)
Line Input #hFile, sLine
If Trim(sLine) Like "Public Sub Example*" Then
sName = Scan(sLine, "Public Sub *()")[0]
sSource = sLine & "\n"
Continue
Else If sName Then
If Trim(sLine) = "End" Then
sSource &= sLine & "\n"
File.Save(ROOT &/ sName, sSource)
Print sName
sName = ""
Else
sSource &= sLine & "\n"
Endif
Endif
Wend
Close hFile
End