단어 문제 ()안녕하세요,
나는 다음과 같은 코드를 작성했다.
1. 테이블에 열 이름 EPATH가 있는지 확인하십시오.
2. 그렇다면 열의 모든 값을 가져옵니다.
3. 열 값에서 마지막 "\"다음에 문자열을 가져와야합니다.
4. 코드는 작동하지만 값 끝에 "}"을 추가합니다.
If( Contains( col_name ,"EPATH" ),
unique_epath = {};
unique_epath = Associative Array(dt:EPATH) << Get Keys;
wordlist=Words(char(unique_epath), "\");
totword=NItems(wordlist);
Column(dtout,"Order")[1] = wordlist[totword-0];
);
이 문제를 어떻게 해결할 수 있습니까?
티아
제목 : Re : 문제 ()이 작품. 고마워!제목 : Re : 문제 ()이게 너 니가 한거야?
NamesDefaultToHere(1);
dt = New Table( "Test",
Add Rows( 5 ),
New Column( "EPATH",
Character,
"Nominal",
Set Values( {"a\b\c", "a\b\c", "d\e\f", "d\e\f", "g\h\i"} )
)
);
unique_epath = Associative Array(dt:EPATH) << Get Keys;
lastPart = {};
for(p=1, p<=NItems(unique_epath), p++,
parts = Words(unique_epath[p], "\");
InsertInto(lastPart, parts[NItems(parts)])
);
Print(lastPart);