-1
형식 문제와 함께 값을 전달하는 것과 관련된 문제가 있습니다. 설명은 내가 코드 에 대한 내 코드에서 내 PreEditedCheque
을 전달하는 데 코드를 넣었습니다. if length(RawChequenumber) = 15
의 출력은 1 자리 대신 00001 (예) 당신이 요구하는지 무엇숫자 형식의 값 전달
MM = HostGetFLD('','MM')
YY = HostGetFLD('','YY')
PreEditedCheque = substr(RawChequenumber,11,5)
ValidateMMonCheque = substr(RawChequenumber,7,2)
if ValidateMMonCheque <> MM Then *From this statement*
Do
PreEditedCheque = substr('00000',1,5) *This part where those 0 can't be properly shown if pass to the next statement*
EditedCheque = '00'||'2'||'0'||YY||MM||'00'||PreEditedCheque
rc = message(2,2,EditedCheque)
End
if length(RawChequenumber) = 15 Then
EditedCheque = '00'||'2'||'0'||YY||MM||'00'||PreEditedCheque + 1 *Second statement if <>MM ran, this part, the PreEditedCheque will be not in 00001, it will be 1.
rc = PanSetCtlData('PREVIEW',EditedCheque)
입력 내용은 무엇이며 어떤 결과가 나고 무엇을 기대하고 있습니까 ??? –
출력이 00001 (5 자리) 대신 1 (한 자리 만)이 될 것으로 예상됩니다. 실제로 입력은 rawchequenumber 변수에서 전달됩니다. –
문제는 두 번째 명령문에서'+'입니다.이 표현식은 숫자 표현식으로 변환됩니다. Right 함수를 사용하는 로스의 제안은 작동합니다. –