1
如何在循環內調用函數?我試圖運行一個無限循環來運行一個函數。我有這樣的東西循環內的函數 - powershell
#Infinite loop to filter file
while ($true){
#run this function
filterFile
}
function filterFile{
#do filtering of files here
}
function anotherFunction{
#another function
}
如果有可能我該如何實現它,如果不是有其他方式?
將你的函數移到循環之前,你應該會很好。 – TheMadTechnician
這很好。我想我太過分了,忘了這麼做。 Thankss! – user7836693