배열을 global procedure
에 전달해야하지만 평소와 같이 다시 정의해야합니다. 나는 이것이 약간의 noobie 질문이라는 것을 알고 있지만 배열을 프로 시저로 전달할 수 있습니까? 그렇지 않다면, 그것을 글로벌하게 만들어 프로 시저에 삽입 할 수 있습니까?전역 프로 시저로 배열 전달
$selectedFace = `ls -selection` ;
global proc crTestScripts($selectedFace) {
print ("OMG aren't lists of things awesome?!" + $selectedFace) ;
}
또는
$selectedFace = `ls -selection` ;
global array? $selectedFace ;
global proc crTestScripts() {
global array? $selectedFace ;
print ("OMG aren't lists of things awesome?!" + $selectedFace) ;
}
내가이 문자열을 전달 그리고 난이 오류가 계속 얻을 :
string $selectedFace[] = `ls -sl` ;
global proc applyCurrentType (string $selectedFace[]) {
print("Apply Current Type button clicked\n") ;
global int $applyCurrentType ;
$applyCurrentType = 1 ;
select -cl ;
select $selectedFace ;
crTestScripts ;
}
:
여기 Error: Wrong number of arguments on call to applyCurrentType
코드의 샘플입니다
내가 알고있는 조각에서 늦게 Tad, 그러나 t 그는 아마도 당신이 당신의 applyCurrentType() 함수를 호출하는 방법 때문일 것입니다. 당신이 그 코드를 긁어 낼 수 있다면 아마 더 많은 도움을 줄 수 있을까요? (호출은 다음과 같아야합니다 :'applyCurrentType ($ selectedFace)'methinks) – tanantish