【QBASIC互換!?】FreeBasic【GPL】
■ このスレッドは過去ログ倉庫に格納されています
0448デフォルトの名無しさん
2011/11/12(土) 01:08:28.05まあ、+や&は普通に連結すればいいね
Function wide( ByRef strings As WString ) As String
Dim As Integer count = Pos()
For i As Integer = 1 To Len( strings )
count -= ( Asc( Mid( strings , i , 1 ) ) > 256)
Next i
Print strings;
Locate , count + Len( strings )
Return ""
End Function
Dim As WString * 200 text = "こんにちは、世界!Hello World!"
Print text
Print wide( text ) ; Len( text ) ; wide( text )
Print wide( text ) , Len( text )
Print wide( text ) & Len( text )
Print wide( text ) + Str( Len( text ) )
Print wide( text ) & Len( text ) & wide( text )
Sleep
>>447
ポインタの戻り値はちゃんとポインタで受けてDeallocateしないと
それに慣れると思わぬとこでおかしな動作しちまうよ
■ このスレッドは過去ログ倉庫に格納されています