![]() |
![]() |
#1 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
Something like 'DECLARE SUB' for Statements (Forward declarartions)
In a piece of code I have some Statements (Functions).
They all must be declared and implemented before using them, e.g. Code:
Statement multiplicateMatrix{sx, sy, i} Shared Points() Points(i)\x = sx * Points(i)\x Points(i)\y = sy * Points(i)\y End Statement For i=0 To points_count multiplicateMatrix{sx, sy, i} Next i Code:
DECLARE SUB multiplicateMatrix(sx, sy) ... For i=0 To points_count Call multiplicateMatrix(sx, sy, i) Next i ... SUB s.transform(sx, sy, i) SHARED x.points, y.points x.points(i) = sx*x.points(i) y.points(i) = sy*y.points(i) End SUB |
![]() |
![]() |
#2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,414
|
Nope, there's no way to do that. Usually what I do is store the functions and statements in a separate file and include that at the top of my main source file. That keeps them from filling up most of the listing.
|
![]() |
![]() |
#3 |
Registered User
Join Date: Apr 2018
Location: Germany
Posts: 201
|
Thank you, and especially for the hint with the extra file for the functions. I'll probably do the same:-)
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forward statement or function | Nightshft | Coders. Blitz Basic | 5 | 17 April 2020 01:02 |
Looking forward to the Vampire 4? | Welshieinnz | Amiga scene | 406 | 31 January 2020 09:13 |
If statements with Vasm | LaBodilsen | Coders. Asm / Hardware | 5 | 24 September 2019 17:55 |
ASM in statements - accessing "shared" variables | earok | Coders. Blitz Basic | 4 | 27 September 2017 06:52 |
Blitz2 blit and block statements inside procedures | htdreams | Coders. Tutorials | 4 | 29 April 2013 08:36 |
|
|