2026-07-23
Misc - Programming What Is

Page Title: Misc - Programming What Is
Last Modified: 2026-06-10 22:58:00
Current Date: 2026-07-23 11:14:49 UTC

These are my Programming pages for simple bits of frequently used code.

I mainly use 3 programming languages for various projects, these being Python, PHP and also PureBasic. I have a tendency to forget some of the simple programming things, language definitions and language formats as these languages all have their different nuance's, so writing the simple stuff here is to help me to remember

For example the for-next loops can use parentheses '( )' or brace brackets '{ }' or a mixture of both or nothing at all.
Here is the same code but written in the 3 different languages I use, first is Python, next is PHP and then last one is PureBasic

Python
	
	fruits = ["apple", "banana", "cherry"]
	for x in fruits:
	  print(x)
	
PHP

	$fruits = ["apple", "banana", "cherry"];
	foreach ($fruits as $x) {
		echo $x . PHP_EOL;
	}
	
PureBasic

	; Define an array of strings
	Dim fruits.s(2)

	fruits(0) = "apple"
	fruits(1) = "banana"
	fruits(2) = "cherry"

	; Iterate and print each element
	For i = 0 To ArraySize(fruits()) - 1
	  Debug fruits(i)
	  ; Use PrintN if running a console program:
	  ; PrintN(fruits(i))
	Next
	

Copyright © 2002 to 2026