Skip to content

read_stringReadStringReadStringread_stringT_read_string🔗

説明🔗

read_stringReadStringReadStringread_stringT_read_string — テキストウインドウから文字列を読み込む。

警告🔗

このオペレーターはdev_open_windowによって開かれたHDevelop グラフィックスウィンドウでは機能しません。

書式🔗

read_string( window WindowHandle, string InString, integer Length, out string OutString )void ReadString( const HTuple& WindowHandle, const HTuple& InString, const HTuple& Length, HTuple* OutString )static void HOperatorSet.ReadString( HTuple windowHandle, HTuple inString, HTuple length, out HTuple outString )def read_string( window_handle: HHandle, in_string: str, length: int ) -> str

Herror T_read_string( const Htuple WindowHandle, const Htuple InString, const Htuple Length, Htuple* OutString )

HString HWindow::ReadString( const HString& InString, Hlong Length ) const

HString HWindow::ReadString( const char* InString, Hlong Length ) const

HString HWindow::ReadString( const wchar_t* InString, Hlong Length ) const (Windows only)

string HWindow.ReadString( string inString, int length )

説明🔗

read_stringReadString は、テキストウインドウ(=出力ウインドウ)内で、 キーボードからあらかじめ決められた最大長 (Lengthlengthlength) をもつ 文字列を読み込みます。 文字列は、現在のフォントを使用してテキスト カーソルの現在の位置から読み込まれます。最大長は、ウインドウの 右境界内に文字列が収まるように十分な大きさである必要があります。 デフォルトの文字列が与えられており、それをユーザが編集できます。 テキスト入力後、テキストカーソルの位置は編集される文字列の最後となります。 編集に対するコマンド:

  • RETURN 入力終わり

  • BACKSPACE カーソル左側の文字を削除した後、 カーソルをその位置へ移動します。

    長さは文字数で表されます。 もし、set_systemSetSystem で’filename_encoding’ が ‘locale’ に設定されている 場合、長さはバイト数で表されます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

WindowHandlewindowHandlewindow_handle (input_control) window → (handle)HTuple (HHandle)HWindow, HTuple (IntPtr)HHandleHtuple (handle)

ウインドウハンドル

InStringinStringin_string (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

(入力前に見ることができる)デフォルト文字列

初期値: ''""

Lengthlengthlength (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

文字の最大数

初期値: 3232
制限: Length > 0 && Length <= 1024

OutStringoutStringout_string (output_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

読み込んだ文字列

結果🔗

テキストウインドウが有効であり、最大長さをもつ文字列がウインドウの 右境界内に適合する場合、read_stringReadString は、値 2 (H_MSG_TRUE) を返します。 そうでなければ、例外が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

open_windowOpenWindow, set_fontSetFont

他の選択候補

read_charReadChar, fread_stringFreadString, fread_charFreadChar

関連項目

set_tpositionSetTposition, new_lineNewLine, open_windowOpenWindow, set_fontSetFont, set_colorSetColor

モジュール🔗

Foundation