Search notes:

PowerShell: for statement

for (
  [int] $num = 4      ; # Statement(s) that are executed before the loop is entered
  $num -lt 9          ; # Loop is exited when this condition is true at the end of the loop
  $num  ++              # Statement to be executd if condition is not reached at end of loop
) {

  write-host("num = $num");

}
#
# num = 4
# num = 5
# num = 6
# num = 7
# num = 8
Github repository about-powershell, path: /language/statement/for/simple.ps1

See also

The foreach statement.
Other statements

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Windows/...', 1740464871, '18.189.189.100', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Windows/PowerShell/language/statement/for/index(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78