#N88BASIC
Dim text As String
Dim a As String
Dim b As String
text="12345"+Chr$(13)+Chr$(10)+"67890"
MessageBox(0,StrPtr(text),"text",MB_OK)'textの内容を確認
a=Mid$(text,1,5)
b=Mid$(text,8,5)
Print a
Print b
Windowsの場合、改行は2バイトです。 Chr$(13)+Chr$(10)や、半角の¥r¥nで表せます。 [hide=サンプルコード][code]#N88BASIC Dim text As String Dim a As String Dim b As String text="12345"+Chr$(13)+Chr$(10)+"67890" MessageBox(0,StrPtr(text),"text",MB_OK)'textの内容を確認 a=Mid$(text,1,5) b=Mid$(text,8,5) Print a Print b[/code][/hide] iniファイルには、[url=http://www.activebasic.com/forum/viewtopic.php?t=2347]こういうもの[/url]もあります。 [url=http://www.activebasic.com/forum/viewtopic.php?t=2350]これ[/url]も参考になると思います。
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (lpAppName As *Byte,lpKeyName As *Byte,lpDefault As *Byte,lpReturnedString As *Byte,nSize As DWord,lpFileName As *Byte) As DWord
詳しい使い方はWebで調べてみてください。
読み込むだけなら、GetPrivateProfileString関数でいけます。
定義[code]Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (lpAppName As *Byte,lpKeyName As *Byte,lpDefault As *Byte,lpReturnedString As *Byte,nSize As DWord,lpFileName As *Byte) As DWord[/code]