Is there a way to check the type of a variable in vim? I need to check to make sure my functions argument is a number and am not sure how to go about it.
You're looking for type(varname)
.
Note that explicit type checks are somewhat of a code smell (especially because the exact implicit type conversions done by Vim are not widely known); though I have to admit that sometimes they do make for a nice and short function interface.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다