Dear Support,
I would like to see more structured blocks like in other BASIC's
' In the main module:
Procedure Main()
End Procedure
Function <function_name> (parameters....) as <return_type>
End Function
IF ... THEN ...ELSE...END IF Blocks
SELECT...CASE...END SELECT
DO...LOOP [UNTIL | WHILE] and DO [WHILE | UNTIL]...LOOP
- Module files
- Project files
Kind regards
More structered blocks for Structural or Modular programming
- Andre
- PureBasic Team
- Posts: 2137
- Joined: Fri Apr 25, 2003 6:14 pm
- Location: Germany (Saxony, Deutscheinsiedel)
- Contact:
Have you ever seen a PureBasic code or the manualFunction <function_name> (parameters....) as <return_type>
End Function
IF ... THEN ...ELSE...END IF Blocks
SELECT...CASE...END SELECT
DO...LOOP [UNTIL | WHILE] and DO [WHILE | UNTIL]...LOOP

There is:
If ... Else ... ElseIf ... EndIf (there will be no Then

Select .... Case ... EndSelect
While .... Wend
Repeat ... Until
- tinman
- PureBasic Expert
- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: More structered blocks for Structural or Modular program
idStefke wrote:' In the main module:
Procedure Main()
End Procedure
Function <function_name> (parameters....) as <return_type>
End Function
You can do this if you really want (procedures are the same as functions):
Declare my_function(parameter)
Procedure Main()
my_function(666)
EndProcedure
Procedure my_function(parameter)
; Do whatever
EndProcedure
Main() ; Call main procedure and run program
idStefke wrote: - Module files
- Project files
Module files? Well, you can create any other source files and include it in your code with the XIncludeFile or IncludeFile keywords.
Project files? It might be worthwhile, but PureBasic sources are not a combination of many different file types at the moment. As I said above, you can split it into files and include them all.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)