[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 1001- 2ch.scのread.cgiへ]
Update time : 12/13 05:17 / Filesize : 519 KB / Number-of Response : 1084
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

【QBASIC互換!?】FreeBasic【GPL】



461 名前:デフォルトの名無しさん mailto:sage [2011/11/12(土) 01:08:28.05 .net]
こんなんでいいと思うけど、最後だけは関数が先に処理されるみたいで表示が変だけどね
まあ、+や&は普通に連結すればいいね
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しないと
それに慣れると思わぬとこでおかしな動作しちまうよ






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧](;´Д`)<519KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef