Ignore:
Timestamp:
Feb 25, 2007, 12:56:09 AM (17 years ago)
Author:
イグトランス (egtra)
Message:

#51対応

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/basic/command.sbp

    r119 r121  
    212212
    213213        'データを変数に格納
    214         Select Case _System_InputDataType[i]
    215             Case _System_Type_Double
    216                 SetDouble(_System_InputDataPtr[i],Val(buffer))
    217             Case _System_Type_Single
    218                 SetSingle(_System_InputDataPtr[i],Val(buffer))
    219             Case _System_Type_Int64,_System_Type_QWord
    220                 SetQWord(_System_InputDataPtr[i],Val(buffer))
    221             Case _System_Type_Long,_System_Type_DWord
    222                 SetDWord(_System_InputDataPtr[i],Val(buffer))
    223             Case _System_Type_Integer,_System_Type_Word
    224                 SetWord(_System_InputDataPtr[i],Val(buffer))
    225             Case _System_Type_Char,_System_Type_Byte
    226                 SetByte(_System_InputDataPtr[i],Val(buffer))
    227 
    228             Case _System_Type_String
    229                 Dim pTempStr As *String
    230                 pTempStr=_System_InputDataPtr[i] As *String
    231 
    232                 pTempStr->Length=i3
    233                 pTempStr->Chars=_System_realloc(pTempStr->Chars,pTempStr->Length+1)
    234                 memcpy(pTempStr->Chars,buffer.Chars,pTempStr->Length)
    235                 pTempStr->Chars[pTempStr->Length]=0
    236         End Select
    237 
    238         i=i+1
     214        _System_Input_SetArgument(_System_InputDataPtr[i], _System_InputDataType[i], buffer, i3)
     215
     216
     217        i++
    239218        If _System_InputDataPtr[i]=0 Then Exit While
    240219    Wend
    241220End Sub
     221
     222Function _System_Input_SetArgument(arg As VoidPtr, dataType As DWord, ByRef buf As String, bufLen As Long)
     223    Select Case dataType
     224        Case _System_Type_Double
     225            SetDouble(arg, Val(buf))
     226        Case _System_Type_Single
     227            SetSingle(arg, Val(buf))
     228        Case _System_Type_Int64,_System_Type_QWord
     229            SetQWord(arg, Val(buf))
     230        Case _System_Type_Long,_System_Type_DWord
     231            SetDWord(arg, Val(buf))
     232        Case _System_Type_Integer,_System_Type_Word
     233            SetWord(arg, Val(buf))
     234        Case _System_Type_SByte,_System_Type_Byte
     235            SetByte(arg, Val(buf))
     236        Case _System_Type_Char
     237            SetChar(arg, buf[0])
     238        Case _System_Type_String
     239            Dim pTempStr As *String
     240            pTempStr = arg As *String
     241            pTempStr->ReSize(bufLen)
     242            memcpy(pTempStr->Chars, buf.Chars, SizeOf (Char) * pTempStr->Length)
     243            pTempStr->Chars[pTempStr->Length] = 0
     244    End Select
     245End Function
    242246
    243247Sub PRINT_ToFile(FileNumber As Long, buf As String)
Note: See TracChangeset for help on using the changeset viewer.