It is currently Tue Aug 21, 2018 10:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Dev-Module
PostPosted: Mon Jun 11, 2018 5:54 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Hello everyone,

Even if I didn't finish Dev-Module the way I want it, I'm releasing the source code anyway at version 0.9.1 so you can compile the program for your self.

https://www.dropbox.com/s/fq07spxvst6bxvw/Dev-Module-099.zip?dl=0

The source code has been successfully compiled on Window XP SP3 and Ubuntu 18.04 x64. The source code might require some adjustment on MacOS, see these source files for more detail :

    DevModule - DevModule.pb
    DevModule - Extra.pb

Please note that the program is available in French and English but it can be translated to any other language. The help files are under construction as well and will be released when they will be ready in French and English.

What the program does you may ask ? See this program as a Module Wizard like a Class Wizard in C++. Before someone tell me A MODULE IS NOT A CLASS ! I'm aware of that. An example, you need a 4X4 matrix of double to do some computation and Write and Read them on file but you don't want to write the entire code your self so see what Dev-Module can do for you in a matter of milliseconds.

Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code generated by : Dev-Module - V0.9.1
; Project name : the project name here
; File name : File name here
; File Version : 0.0.0
; Programmation : In progress
; Programmed by : StarBootics
; Creation Date : 10-06-2018
; Last update : 10-06-2018
; Coded for PureBasic : V5.70 beta 1
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule Matrix44

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Structure declaration <<<<<

  Structure Matrix44

    e11.d
    e21.d
    e31.d
    e41.d
    e12.d
    e22.d
    e32.d
    e42.d
    e13.d
    e23.d
    e33.d
    e43.d
    e14.d
    e24.d
    e34.d
    e44.d

  EndStructure

  Declare Reset(*Matrix44A.Matrix44)
  Declare Equal(*Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Plus(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Minus(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Product(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Zero(*Matrix44A.Matrix44)
  Declare One(*Matrix44A.Matrix44)
  Declare ProductByScalar(*Matrix44R.Matrix44, *Matrix44A.Matrix44, P_Scalar.d)
  Declare DivideByScalar(*Matrix44R.Matrix44, *Matrix44A.Matrix44, P_Scalar.d)
  Declare Copy(*Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Compare(*Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Swapping(*Matrix44A.Matrix44, *Matrix44B.Matrix44)
  Declare Identity(*Matrix44A.Matrix44)
  Declare Transpose(*Matrix44R.Matrix44, *Matrix44A.Matrix44)
  Declare SelfTranspose(*Matrix44A.Matrix44)
  Declare Randomize(*Matrix44A.Matrix44, Min.d, Max.d, Resolution = 10000)
  Declare.d Determinant(*Matrix44A.Matrix44)
  Declare.b Inverse(*Inverse.Matrix44, *Matrix44A.Matrix44)
  Declare.s FormatLine1(*Matrix44A.Matrix44, Decimal = 6)
  Declare.s FormatLine2(*Matrix44A.Matrix44, Decimal = 6)
  Declare.s FormatLine3(*Matrix44A.Matrix44, Decimal = 6)
  Declare.s FormatLine4(*Matrix44A.Matrix44, Decimal = 6)
  Declare UnformatLine1(*Matrix44A.Matrix44, P_MatrixLine.s)
  Declare UnformatLine2(*Matrix44A.Matrix44, P_MatrixLine.s)
  Declare UnformatLine3(*Matrix44A.Matrix44, P_MatrixLine.s)
  Declare UnformatLine4(*Matrix44A.Matrix44, P_MatrixLine.s)
  Declare ReadMatrix44(FileID.i, *Matrix44A.Matrix44)
  Declare WriteMatrix44(FileID.i, *Matrix44A.Matrix44)

EndDeclareModule

Module Matrix44

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Reset operator <<<<<

  Procedure Reset(*Matrix44A.Matrix44)
   
    *Matrix44A\e11 = 0.0
    *Matrix44A\e21 = 0.0
    *Matrix44A\e31 = 0.0
    *Matrix44A\e41 = 0.0
    *Matrix44A\e12 = 0.0
    *Matrix44A\e22 = 0.0
    *Matrix44A\e32 = 0.0
    *Matrix44A\e42 = 0.0
    *Matrix44A\e13 = 0.0
    *Matrix44A\e23 = 0.0
    *Matrix44A\e33 = 0.0
    *Matrix44A\e43 = 0.0
    *Matrix44A\e14 = 0.0
    *Matrix44A\e24 = 0.0
    *Matrix44A\e34 = 0.0
    *Matrix44A\e44 = 0.0
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Equal operator : A = B <<<<<

  Procedure Equal(*Matrix44A.Matrix44, *Matrix44B.Matrix44)

    *Matrix44A\e11 = *Matrix44B\e11
    *Matrix44A\e21 = *Matrix44B\e21
    *Matrix44A\e31 = *Matrix44B\e31
    *Matrix44A\e41 = *Matrix44B\e41
    *Matrix44A\e12 = *Matrix44B\e12
    *Matrix44A\e22 = *Matrix44B\e22
    *Matrix44A\e32 = *Matrix44B\e32
    *Matrix44A\e42 = *Matrix44B\e42
    *Matrix44A\e13 = *Matrix44B\e13
    *Matrix44A\e23 = *Matrix44B\e23
    *Matrix44A\e33 = *Matrix44B\e33
    *Matrix44A\e43 = *Matrix44B\e43
    *Matrix44A\e14 = *Matrix44B\e14
    *Matrix44A\e24 = *Matrix44B\e24
    *Matrix44A\e34 = *Matrix44B\e34
    *Matrix44A\e44 = *Matrix44B\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Plus operator : R = A + B <<<<<

  Procedure Plus(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)

    *Matrix44R\e11 = *Matrix44A\e11 + *Matrix44B\e11
    *Matrix44R\e21 = *Matrix44A\e21 + *Matrix44B\e21
    *Matrix44R\e31 = *Matrix44A\e31 + *Matrix44B\e31
    *Matrix44R\e41 = *Matrix44A\e41 + *Matrix44B\e41
    *Matrix44R\e12 = *Matrix44A\e12 + *Matrix44B\e12
    *Matrix44R\e22 = *Matrix44A\e22 + *Matrix44B\e22
    *Matrix44R\e32 = *Matrix44A\e32 + *Matrix44B\e32
    *Matrix44R\e42 = *Matrix44A\e42 + *Matrix44B\e42
    *Matrix44R\e13 = *Matrix44A\e13 + *Matrix44B\e13
    *Matrix44R\e23 = *Matrix44A\e23 + *Matrix44B\e23
    *Matrix44R\e33 = *Matrix44A\e33 + *Matrix44B\e33
    *Matrix44R\e43 = *Matrix44A\e43 + *Matrix44B\e43
    *Matrix44R\e14 = *Matrix44A\e14 + *Matrix44B\e14
    *Matrix44R\e24 = *Matrix44A\e24 + *Matrix44B\e24
    *Matrix44R\e34 = *Matrix44A\e34 + *Matrix44B\e34
    *Matrix44R\e44 = *Matrix44A\e44 + *Matrix44B\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Minus operator : R = A - B <<<<<

  Procedure Minus(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)

    *Matrix44R\e11 = *Matrix44A\e11 - *Matrix44B\e11
    *Matrix44R\e21 = *Matrix44A\e21 - *Matrix44B\e21
    *Matrix44R\e31 = *Matrix44A\e31 - *Matrix44B\e31
    *Matrix44R\e41 = *Matrix44A\e41 - *Matrix44B\e41
    *Matrix44R\e12 = *Matrix44A\e12 - *Matrix44B\e12
    *Matrix44R\e22 = *Matrix44A\e22 - *Matrix44B\e22
    *Matrix44R\e32 = *Matrix44A\e32 - *Matrix44B\e32
    *Matrix44R\e42 = *Matrix44A\e42 - *Matrix44B\e42
    *Matrix44R\e13 = *Matrix44A\e13 - *Matrix44B\e13
    *Matrix44R\e23 = *Matrix44A\e23 - *Matrix44B\e23
    *Matrix44R\e33 = *Matrix44A\e33 - *Matrix44B\e33
    *Matrix44R\e43 = *Matrix44A\e43 - *Matrix44B\e43
    *Matrix44R\e14 = *Matrix44A\e14 - *Matrix44B\e14
    *Matrix44R\e24 = *Matrix44A\e24 - *Matrix44B\e24
    *Matrix44R\e34 = *Matrix44A\e34 - *Matrix44B\e34
    *Matrix44R\e44 = *Matrix44A\e44 - *Matrix44B\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Product operator : R = A * B <<<<<

  Procedure Product(*Matrix44R.Matrix44, *Matrix44A.Matrix44, *Matrix44B.Matrix44)

    *Matrix44R\e11 = *Matrix44A\e11 * *Matrix44B\e11 + *Matrix44A\e12 * *Matrix44B\e21 + *Matrix44A\e13 * *Matrix44B\e31 + *Matrix44A\e14 * *Matrix44B\e41
    *Matrix44R\e12 = *Matrix44A\e11 * *Matrix44B\e12 + *Matrix44A\e12 * *Matrix44B\e22 + *Matrix44A\e13 * *Matrix44B\e32 + *Matrix44A\e14 * *Matrix44B\e42
    *Matrix44R\e13 = *Matrix44A\e11 * *Matrix44B\e13 + *Matrix44A\e12 * *Matrix44B\e23 + *Matrix44A\e13 * *Matrix44B\e33 + *Matrix44A\e14 * *Matrix44B\e43
    *Matrix44R\e14 = *Matrix44A\e11 * *Matrix44B\e14 + *Matrix44A\e12 * *Matrix44B\e24 + *Matrix44A\e13 * *Matrix44B\e34 + *Matrix44A\e14 * *Matrix44B\e44
    *Matrix44R\e21 = *Matrix44A\e21 * *Matrix44B\e11 + *Matrix44A\e22 * *Matrix44B\e21 + *Matrix44A\e23 * *Matrix44B\e31 + *Matrix44A\e24 * *Matrix44B\e41
    *Matrix44R\e22 = *Matrix44A\e21 * *Matrix44B\e12 + *Matrix44A\e22 * *Matrix44B\e22 + *Matrix44A\e23 * *Matrix44B\e32 + *Matrix44A\e24 * *Matrix44B\e42
    *Matrix44R\e23 = *Matrix44A\e21 * *Matrix44B\e13 + *Matrix44A\e22 * *Matrix44B\e23 + *Matrix44A\e23 * *Matrix44B\e33 + *Matrix44A\e24 * *Matrix44B\e43
    *Matrix44R\e24 = *Matrix44A\e21 * *Matrix44B\e14 + *Matrix44A\e22 * *Matrix44B\e24 + *Matrix44A\e23 * *Matrix44B\e34 + *Matrix44A\e24 * *Matrix44B\e44
    *Matrix44R\e31 = *Matrix44A\e31 * *Matrix44B\e11 + *Matrix44A\e32 * *Matrix44B\e21 + *Matrix44A\e33 * *Matrix44B\e31 + *Matrix44A\e34 * *Matrix44B\e41
    *Matrix44R\e32 = *Matrix44A\e31 * *Matrix44B\e12 + *Matrix44A\e32 * *Matrix44B\e22 + *Matrix44A\e33 * *Matrix44B\e32 + *Matrix44A\e34 * *Matrix44B\e42
    *Matrix44R\e33 = *Matrix44A\e31 * *Matrix44B\e13 + *Matrix44A\e32 * *Matrix44B\e23 + *Matrix44A\e33 * *Matrix44B\e33 + *Matrix44A\e34 * *Matrix44B\e43
    *Matrix44R\e34 = *Matrix44A\e31 * *Matrix44B\e14 + *Matrix44A\e32 * *Matrix44B\e24 + *Matrix44A\e33 * *Matrix44B\e34 + *Matrix44A\e34 * *Matrix44B\e44
    *Matrix44R\e41 = *Matrix44A\e41 * *Matrix44B\e11 + *Matrix44A\e42 * *Matrix44B\e21 + *Matrix44A\e43 * *Matrix44B\e31 + *Matrix44A\e44 * *Matrix44B\e41
    *Matrix44R\e42 = *Matrix44A\e41 * *Matrix44B\e12 + *Matrix44A\e42 * *Matrix44B\e22 + *Matrix44A\e43 * *Matrix44B\e32 + *Matrix44A\e44 * *Matrix44B\e42
    *Matrix44R\e43 = *Matrix44A\e41 * *Matrix44B\e13 + *Matrix44A\e42 * *Matrix44B\e23 + *Matrix44A\e43 * *Matrix44B\e33 + *Matrix44A\e44 * *Matrix44B\e43
    *Matrix44R\e44 = *Matrix44A\e41 * *Matrix44B\e14 + *Matrix44A\e42 * *Matrix44B\e24 + *Matrix44A\e43 * *Matrix44B\e34 + *Matrix44A\e44 * *Matrix44B\e44

  EndProcedure

    ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Zero operator <<<<<

  Procedure Zero(*Matrix44A.Matrix44)
   
    *Matrix44A\e11 = 0.0
    *Matrix44A\e21 = 0.0
    *Matrix44A\e31 = 0.0
    *Matrix44A\e41 = 0.0
    *Matrix44A\e12 = 0.0
    *Matrix44A\e22 = 0.0
    *Matrix44A\e32 = 0.0
    *Matrix44A\e42 = 0.0
    *Matrix44A\e13 = 0.0
    *Matrix44A\e23 = 0.0
    *Matrix44A\e33 = 0.0
    *Matrix44A\e43 = 0.0
    *Matrix44A\e14 = 0.0
    *Matrix44A\e24 = 0.0
    *Matrix44A\e34 = 0.0
    *Matrix44A\e44 = 0.0
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The One operator <<<<<

  Procedure One(*Matrix44A.Matrix44)
   
    *Matrix44A\e11 = 1.0
    *Matrix44A\e21 = 1.0
    *Matrix44A\e31 = 1.0
    *Matrix44A\e41 = 1.0
    *Matrix44A\e12 = 1.0
    *Matrix44A\e22 = 1.0
    *Matrix44A\e32 = 1.0
    *Matrix44A\e42 = 1.0
    *Matrix44A\e13 = 1.0
    *Matrix44A\e23 = 1.0
    *Matrix44A\e33 = 1.0
    *Matrix44A\e43 = 1.0
    *Matrix44A\e14 = 1.0
    *Matrix44A\e24 = 1.0
    *Matrix44A\e34 = 1.0
    *Matrix44A\e44 = 1.0
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The ProductByScalar operator : R = A * Scalar <<<<<

  Procedure ProductByScalar(*Matrix44R.Matrix44, *Matrix44A.Matrix44, P_Scalar.d)

    *Matrix44R\e11 = *Matrix44A\e11 * P_Scalar
    *Matrix44R\e21 = *Matrix44A\e21 * P_Scalar
    *Matrix44R\e31 = *Matrix44A\e31 * P_Scalar
    *Matrix44R\e41 = *Matrix44A\e41 * P_Scalar
    *Matrix44R\e12 = *Matrix44A\e12 * P_Scalar
    *Matrix44R\e22 = *Matrix44A\e22 * P_Scalar
    *Matrix44R\e32 = *Matrix44A\e32 * P_Scalar
    *Matrix44R\e42 = *Matrix44A\e42 * P_Scalar
    *Matrix44R\e13 = *Matrix44A\e13 * P_Scalar
    *Matrix44R\e23 = *Matrix44A\e23 * P_Scalar
    *Matrix44R\e33 = *Matrix44A\e33 * P_Scalar
    *Matrix44R\e43 = *Matrix44A\e43 * P_Scalar
    *Matrix44R\e14 = *Matrix44A\e14 * P_Scalar
    *Matrix44R\e24 = *Matrix44A\e24 * P_Scalar
    *Matrix44R\e34 = *Matrix44A\e34 * P_Scalar
    *Matrix44R\e44 = *Matrix44A\e44 * P_Scalar

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The DivideByScalar operator : R = A / Scalar <<<<<

  Procedure DivideByScalar(*Matrix44R.Matrix44, *Matrix44A.Matrix44, P_Scalar.d)

    *Matrix44R\e11 = *Matrix44A\e11 / P_Scalar
    *Matrix44R\e21 = *Matrix44A\e21 / P_Scalar
    *Matrix44R\e31 = *Matrix44A\e31 / P_Scalar
    *Matrix44R\e41 = *Matrix44A\e41 / P_Scalar
    *Matrix44R\e12 = *Matrix44A\e12 / P_Scalar
    *Matrix44R\e22 = *Matrix44A\e22 / P_Scalar
    *Matrix44R\e32 = *Matrix44A\e32 / P_Scalar
    *Matrix44R\e42 = *Matrix44A\e42 / P_Scalar
    *Matrix44R\e13 = *Matrix44A\e13 / P_Scalar
    *Matrix44R\e23 = *Matrix44A\e23 / P_Scalar
    *Matrix44R\e33 = *Matrix44A\e33 / P_Scalar
    *Matrix44R\e43 = *Matrix44A\e43 / P_Scalar
    *Matrix44R\e14 = *Matrix44A\e14 / P_Scalar
    *Matrix44R\e24 = *Matrix44A\e24 / P_Scalar
    *Matrix44R\e34 = *Matrix44A\e34 / P_Scalar
    *Matrix44R\e44 = *Matrix44A\e44 / P_Scalar

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Copy operator : A = Source : B = Destination <<<<<

  Procedure Copy(*Matrix44A.Matrix44, *Matrix44B.Matrix44)

    *Matrix44B\e11 = *Matrix44A\e11
    *Matrix44B\e21 = *Matrix44A\e21
    *Matrix44B\e31 = *Matrix44A\e31
    *Matrix44B\e41 = *Matrix44A\e41
    *Matrix44B\e12 = *Matrix44A\e12
    *Matrix44B\e22 = *Matrix44A\e22
    *Matrix44B\e32 = *Matrix44A\e32
    *Matrix44B\e42 = *Matrix44A\e42
    *Matrix44B\e13 = *Matrix44A\e13
    *Matrix44B\e23 = *Matrix44A\e23
    *Matrix44B\e33 = *Matrix44A\e33
    *Matrix44B\e43 = *Matrix44A\e43
    *Matrix44B\e14 = *Matrix44A\e14
    *Matrix44B\e24 = *Matrix44A\e24
    *Matrix44B\e34 = *Matrix44A\e34
    *Matrix44B\e44 = *Matrix44A\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Compare operator <<<<<

  Procedure Compare(*Matrix44A.Matrix44, *Matrix44B.Matrix44)

    If *Matrix44A\e11 <> *Matrix44B\e11
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e21 <> *Matrix44B\e21
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e31 <> *Matrix44B\e31
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e41 <> *Matrix44B\e41
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e12 <> *Matrix44B\e12
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e22 <> *Matrix44B\e22
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e32 <> *Matrix44B\e32
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e42 <> *Matrix44B\e42
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e13 <> *Matrix44B\e13
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e23 <> *Matrix44B\e23
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e33 <> *Matrix44B\e33
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e43 <> *Matrix44B\e43
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e14 <> *Matrix44B\e14
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e24 <> *Matrix44B\e24
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e34 <> *Matrix44B\e34
      ProcedureReturn #False
    EndIf

    If *Matrix44A\e44 <> *Matrix44B\e44
      ProcedureReturn #False
    EndIf

    ProcedureReturn #True
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Swapping operator <<<<<

  Procedure Swapping(*Matrix44A.Matrix44, *Matrix44B.Matrix44)

    Swap *Matrix44A\e11, *Matrix44B\e11
    Swap *Matrix44A\e21, *Matrix44B\e21
    Swap *Matrix44A\e31, *Matrix44B\e31
    Swap *Matrix44A\e41, *Matrix44B\e41
    Swap *Matrix44A\e12, *Matrix44B\e12
    Swap *Matrix44A\e22, *Matrix44B\e22
    Swap *Matrix44A\e32, *Matrix44B\e32
    Swap *Matrix44A\e42, *Matrix44B\e42
    Swap *Matrix44A\e13, *Matrix44B\e13
    Swap *Matrix44A\e23, *Matrix44B\e23
    Swap *Matrix44A\e33, *Matrix44B\e33
    Swap *Matrix44A\e43, *Matrix44B\e43
    Swap *Matrix44A\e14, *Matrix44B\e14
    Swap *Matrix44A\e24, *Matrix44B\e24
    Swap *Matrix44A\e34, *Matrix44B\e34
    Swap *Matrix44A\e44, *Matrix44B\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Identity operator <<<<<

  Procedure Identity(*Matrix44A.Matrix44)

    *Matrix44A\e11 = 1.0
    *Matrix44A\e21 = 0.0
    *Matrix44A\e31 = 0.0
    *Matrix44A\e41 = 0.0
    *Matrix44A\e12 = 0.0
    *Matrix44A\e22 = 1.0
    *Matrix44A\e32 = 0.0
    *Matrix44A\e42 = 0.0
    *Matrix44A\e13 = 0.0
    *Matrix44A\e23 = 0.0
    *Matrix44A\e33 = 1.0
    *Matrix44A\e43 = 0.0
    *Matrix44A\e14 = 0.0
    *Matrix44A\e24 = 0.0
    *Matrix44A\e34 = 0.0
    *Matrix44A\e44 = 1.0

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Transpose operator <<<<<

  Procedure Transpose(*Matrix44R.Matrix44, *Matrix44A.Matrix44)

    *Matrix44R\e11 = *Matrix44A\e11
    *Matrix44R\e21 = *Matrix44A\e12
    *Matrix44R\e31 = *Matrix44A\e13
    *Matrix44R\e41 = *Matrix44A\e14
    *Matrix44R\e12 = *Matrix44A\e21
    *Matrix44R\e22 = *Matrix44A\e22
    *Matrix44R\e32 = *Matrix44A\e23
    *Matrix44R\e42 = *Matrix44A\e24
    *Matrix44R\e13 = *Matrix44A\e31
    *Matrix44R\e23 = *Matrix44A\e32
    *Matrix44R\e33 = *Matrix44A\e33
    *Matrix44R\e43 = *Matrix44A\e34
    *Matrix44R\e14 = *Matrix44A\e41
    *Matrix44R\e24 = *Matrix44A\e42
    *Matrix44R\e34 = *Matrix44A\e43
    *Matrix44R\e44 = *Matrix44A\e44

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The SelfTranspose operator <<<<<

  Procedure SelfTranspose(*Matrix44A.Matrix44)

    Swap *Matrix44A\e12, *Matrix44A\e21
    Swap *Matrix44A\e13, *Matrix44A\e31
    Swap *Matrix44A\e14, *Matrix44A\e41
    Swap *Matrix44A\e23, *Matrix44A\e32
    Swap *Matrix44A\e24, *Matrix44A\e42
    Swap *Matrix44A\e34, *Matrix44A\e43

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Random operator <<<<<

  Procedure Randomize(*Matrix44A.Matrix44, Min.d, Max.d, Resolution = 10000)

    *Matrix44A\e11 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e21 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e31 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e41 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e12 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e22 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e32 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e42 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e13 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e23 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e33 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e43 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e14 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e24 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e34 = (Min + (Max - Min) * Random(Resolution) / Resolution)
    *Matrix44A\e44 = (Min + (Max - Min) * Random(Resolution) / Resolution)

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Determinant operator <<<<<

  Procedure.d Determinant(*Matrix44A.Matrix44)

    ProcedureReturn (*Matrix44A\e11 * *Matrix44A\e22 * *Matrix44A\e33 * *Matrix44A\e44 - *Matrix44A\e11 * *Matrix44A\e22 * *Matrix44A\e34 * *Matrix44A\e43 - *Matrix44A\e11 * *Matrix44A\e32 * *Matrix44A\e23 * *Matrix44A\e44 + *Matrix44A\e11 * *Matrix44A\e32 * *Matrix44A\e24 * *Matrix44A\e43 + *Matrix44A\e11 * *Matrix44A\e42 * *Matrix44A\e23 * *Matrix44A\e34 - *Matrix44A\e11 * *Matrix44A\e42 * *Matrix44A\e24 * *Matrix44A\e33 - *Matrix44A\e21 * *Matrix44A\e12 * *Matrix44A\e33 * *Matrix44A\e44 + *Matrix44A\e21 * *Matrix44A\e12 * *Matrix44A\e34 * *Matrix44A\e43 + *Matrix44A\e21 * *Matrix44A\e32 * *Matrix44A\e13 * *Matrix44A\e44 - *Matrix44A\e21 * *Matrix44A\e32 * *Matrix44A\e14 * *Matrix44A\e43 - *Matrix44A\e21 * *Matrix44A\e42 * *Matrix44A\e13 * *Matrix44A\e34 + *Matrix44A\e21 * *Matrix44A\e42 * *Matrix44A\e14 * *Matrix44A\e33 + *Matrix44A\e31 * *Matrix44A\e12 * *Matrix44A\e23 * *Matrix44A\e44 - *Matrix44A\e31 * *Matrix44A\e12 * *Matrix44A\e24 * *Matrix44A\e43 - *Matrix44A\e31 * *Matrix44A\e22 * *Matrix44A\e13 * *Matrix44A\e44 + *Matrix44A\e31 * *Matrix44A\e22 * *Matrix44A\e14 * *Matrix44A\e43 + *Matrix44A\e31 * *Matrix44A\e42 * *Matrix44A\e13 * *Matrix44A\e24 - *Matrix44A\e31 * *Matrix44A\e42 * *Matrix44A\e14 * *Matrix44A\e23 - *Matrix44A\e41 * *Matrix44A\e12 * *Matrix44A\e23 * *Matrix44A\e34 + *Matrix44A\e41 * *Matrix44A\e12 * *Matrix44A\e24 * *Matrix44A\e33 + *Matrix44A\e41 * *Matrix44A\e22 * *Matrix44A\e13 * *Matrix44A\e34 - *Matrix44A\e41 * *Matrix44A\e22 * *Matrix44A\e14 * *Matrix44A\e33 - *Matrix44A\e41 * *Matrix44A\e32 * *Matrix44A\e13 * *Matrix44A\e24 + *Matrix44A\e41 * *Matrix44A\e32 * *Matrix44A\e14 * *Matrix44A\e23)
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Inverse operator <<<<<

  Procedure.b Inverse(*Inverse.Matrix44, *Matrix44A.Matrix44)

    Copy(*Matrix44A, CopyA.Matrix44)
    Cofactor_Determinant.d = Determinant(*Matrix44A)

    If Cofactor_Determinant <> 0.0
      *Inverse\e11 = (CopyA\e22 * CopyA\e33 * CopyA\e44 - CopyA\e22 * CopyA\e34 * CopyA\e43 - CopyA\e32 * CopyA\e23 * CopyA\e44 + CopyA\e32 * CopyA\e24 * CopyA\e43 + CopyA\e42 * CopyA\e23 * CopyA\e34 - CopyA\e42 * CopyA\e24 * CopyA\e33) / Cofactor_Determinant
      *Inverse\e12 = (CopyA\e12 * CopyA\e34 * CopyA\e43 + CopyA\e32 * CopyA\e13 * CopyA\e44 - CopyA\e32 * CopyA\e14 * CopyA\e43 - CopyA\e42 * CopyA\e13 * CopyA\e34 + CopyA\e42 * CopyA\e14 * CopyA\e33 - CopyA\e12 * CopyA\e33 * CopyA\e44) / Cofactor_Determinant
      *Inverse\e13 = (CopyA\e12 * CopyA\e23 * CopyA\e44 - CopyA\e12 * CopyA\e24 * CopyA\e43 - CopyA\e22 * CopyA\e13 * CopyA\e44 + CopyA\e22 * CopyA\e14 * CopyA\e43 + CopyA\e42 * CopyA\e13 * CopyA\e24 - CopyA\e42 * CopyA\e14 * CopyA\e23) / Cofactor_Determinant
      *Inverse\e14 = (CopyA\e12 * CopyA\e24 * CopyA\e33 + CopyA\e22 * CopyA\e13 * CopyA\e34 - CopyA\e22 * CopyA\e14 * CopyA\e33 - CopyA\e32 * CopyA\e13 * CopyA\e24 + CopyA\e32 * CopyA\e14 * CopyA\e23 - CopyA\e12 * CopyA\e23 * CopyA\e34) / Cofactor_Determinant
      *Inverse\e21 = (CopyA\e21 * CopyA\e34 * CopyA\e43 + CopyA\e31 * CopyA\e23 * CopyA\e44 - CopyA\e31 * CopyA\e24 * CopyA\e43 - CopyA\e41 * CopyA\e23 * CopyA\e34 + CopyA\e41 * CopyA\e24 * CopyA\e33 - CopyA\e21 * CopyA\e33 * CopyA\e44) / Cofactor_Determinant
      *Inverse\e22 = (CopyA\e11 * CopyA\e33 * CopyA\e44 - CopyA\e11 * CopyA\e34 * CopyA\e43 - CopyA\e31 * CopyA\e13 * CopyA\e44 + CopyA\e31 * CopyA\e14 * CopyA\e43 + CopyA\e41 * CopyA\e13 * CopyA\e34 - CopyA\e41 * CopyA\e14 * CopyA\e33) / Cofactor_Determinant
      *Inverse\e23 = (CopyA\e11 * CopyA\e24 * CopyA\e43 + CopyA\e21 * CopyA\e13 * CopyA\e44 - CopyA\e21 * CopyA\e14 * CopyA\e43 - CopyA\e41 * CopyA\e13 * CopyA\e24 + CopyA\e41 * CopyA\e14 * CopyA\e23 - CopyA\e11 * CopyA\e23 * CopyA\e44) / Cofactor_Determinant
      *Inverse\e24 = (CopyA\e11 * CopyA\e23 * CopyA\e34 - CopyA\e11 * CopyA\e24 * CopyA\e33 - CopyA\e21 * CopyA\e13 * CopyA\e34 + CopyA\e21 * CopyA\e14 * CopyA\e33 + CopyA\e31 * CopyA\e13 * CopyA\e24 - CopyA\e31 * CopyA\e14 * CopyA\e23) / Cofactor_Determinant
      *Inverse\e31 = (CopyA\e21 * CopyA\e32 * CopyA\e44 - CopyA\e21 * CopyA\e34 * CopyA\e42 - CopyA\e31 * CopyA\e22 * CopyA\e44 + CopyA\e31 * CopyA\e24 * CopyA\e42 + CopyA\e41 * CopyA\e22 * CopyA\e34 - CopyA\e41 * CopyA\e24 * CopyA\e32) / Cofactor_Determinant
      *Inverse\e32 = (CopyA\e11 * CopyA\e34 * CopyA\e42 + CopyA\e31 * CopyA\e12 * CopyA\e44 - CopyA\e31 * CopyA\e14 * CopyA\e42 - CopyA\e41 * CopyA\e12 * CopyA\e34 + CopyA\e41 * CopyA\e14 * CopyA\e32 - CopyA\e11 * CopyA\e32 * CopyA\e44) / Cofactor_Determinant
      *Inverse\e33 = (CopyA\e11 * CopyA\e22 * CopyA\e44 - CopyA\e11 * CopyA\e24 * CopyA\e42 - CopyA\e21 * CopyA\e12 * CopyA\e44 + CopyA\e21 * CopyA\e14 * CopyA\e42 + CopyA\e41 * CopyA\e12 * CopyA\e24 - CopyA\e41 * CopyA\e14 * CopyA\e22) / Cofactor_Determinant
      *Inverse\e34 = (CopyA\e11 * CopyA\e24 * CopyA\e32 + CopyA\e21 * CopyA\e12 * CopyA\e34 - CopyA\e21 * CopyA\e14 * CopyA\e32 - CopyA\e31 * CopyA\e12 * CopyA\e24 + CopyA\e31 * CopyA\e14 * CopyA\e22 - CopyA\e11 * CopyA\e22 * CopyA\e34) / Cofactor_Determinant
      *Inverse\e41 = (CopyA\e41 * CopyA\e23 * CopyA\e32 - CopyA\e21 * CopyA\e32 * CopyA\e43 + CopyA\e21 * CopyA\e33 * CopyA\e42 + CopyA\e31 * CopyA\e22 * CopyA\e43 - CopyA\e31 * CopyA\e23 * CopyA\e42 - CopyA\e41 * CopyA\e22 * CopyA\e33) / Cofactor_Determinant
      *Inverse\e42 = (CopyA\e11 * CopyA\e32 * CopyA\e43 - CopyA\e11 * CopyA\e33 * CopyA\e42 - CopyA\e31 * CopyA\e12 * CopyA\e43 + CopyA\e31 * CopyA\e13 * CopyA\e42 + CopyA\e41 * CopyA\e12 * CopyA\e33 - CopyA\e41 * CopyA\e13 * CopyA\e32) / Cofactor_Determinant
      *Inverse\e43 = (CopyA\e11 * CopyA\e23 * CopyA\e42 + CopyA\e21 * CopyA\e12 * CopyA\e43 - CopyA\e21 * CopyA\e13 * CopyA\e42 - CopyA\e41 * CopyA\e12 * CopyA\e23 + CopyA\e41 * CopyA\e13 * CopyA\e22 - CopyA\e11 * CopyA\e22 * CopyA\e43) / Cofactor_Determinant
      *Inverse\e44 = (CopyA\e11 * CopyA\e22 * CopyA\e33 - CopyA\e11 * CopyA\e23 * CopyA\e32 - CopyA\e21 * CopyA\e12 * CopyA\e33 + CopyA\e21 * CopyA\e13 * CopyA\e32 + CopyA\e31 * CopyA\e12 * CopyA\e23 - CopyA\e31 * CopyA\e13 * CopyA\e22) / Cofactor_Determinant
      Result.b = #True
    Else
      Identity(*Inverse)
      Result = #False
    EndIf

    ProcedureReturn Result
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Format operators <<<<<

  Procedure.s FormatLine1(*Matrix44A.Matrix44, Decimal = 6)

    ProcedureReturn "[" + StrD(*Matrix44A\e11, Decimal) + " : " + StrD(*Matrix44A\e12, Decimal) + " : " + StrD(*Matrix44A\e13, Decimal) + " : " + StrD(*Matrix44A\e14, Decimal) + "]"
  EndProcedure

  Procedure.s FormatLine2(*Matrix44A.Matrix44, Decimal = 6)

    ProcedureReturn "[" + StrD(*Matrix44A\e21, Decimal) + " : " + StrD(*Matrix44A\e22, Decimal) + " : " + StrD(*Matrix44A\e23, Decimal) + " : " + StrD(*Matrix44A\e24, Decimal) + "]"
  EndProcedure

  Procedure.s FormatLine3(*Matrix44A.Matrix44, Decimal = 6)

    ProcedureReturn "[" + StrD(*Matrix44A\e31, Decimal) + " : " + StrD(*Matrix44A\e32, Decimal) + " : " + StrD(*Matrix44A\e33, Decimal) + " : " + StrD(*Matrix44A\e34, Decimal) + "]"
  EndProcedure

  Procedure.s FormatLine4(*Matrix44A.Matrix44, Decimal = 6)

    ProcedureReturn "[" + StrD(*Matrix44A\e41, Decimal) + " : " + StrD(*Matrix44A\e42, Decimal) + " : " + StrD(*Matrix44A\e43, Decimal) + " : " + StrD(*Matrix44A\e44, Decimal) + "]"
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Unformat operators <<<<<

  Procedure UnformatLine1(*Matrix44A.Matrix44, P_MatrixLine.s)

    *Matrix44A\e11 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 1, ":"))
    *Matrix44A\e12 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 2, ":"))
    *Matrix44A\e13 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 3, ":"))
    *Matrix44A\e14 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 4, ":"))

  EndProcedure

  Procedure UnformatLine2(*Matrix44A.Matrix44, P_MatrixLine.s)

    *Matrix44A\e21 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 1, ":"))
    *Matrix44A\e22 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 2, ":"))
    *Matrix44A\e23 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 3, ":"))
    *Matrix44A\e24 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 4, ":"))

  EndProcedure

  Procedure UnformatLine3(*Matrix44A.Matrix44, P_MatrixLine.s)

    *Matrix44A\e31 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 1, ":"))
    *Matrix44A\e32 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 2, ":"))
    *Matrix44A\e33 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 3, ":"))
    *Matrix44A\e34 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 4, ":"))

  EndProcedure

  Procedure UnformatLine4(*Matrix44A.Matrix44, P_MatrixLine.s)

    *Matrix44A\e41 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 1, ":"))
    *Matrix44A\e42 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 2, ":"))
    *Matrix44A\e43 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 3, ":"))
    *Matrix44A\e44 = ValD(StringField(StringField(StringField(P_MatrixLine, 2, "["), 1, "]"), 4, ":"))

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Read in Binary file <<<<<

  Procedure ReadMatrix44(FileID.i, *Matrix44A.Matrix44)
   
    *Matrix44A\e11 = ReadDouble(FileID)
    *Matrix44A\e21 = ReadDouble(FileID)
    *Matrix44A\e31 = ReadDouble(FileID)
    *Matrix44A\e41 = ReadDouble(FileID)
    *Matrix44A\e12 = ReadDouble(FileID)
    *Matrix44A\e22 = ReadDouble(FileID)
    *Matrix44A\e32 = ReadDouble(FileID)
    *Matrix44A\e42 = ReadDouble(FileID)
    *Matrix44A\e13 = ReadDouble(FileID)
    *Matrix44A\e23 = ReadDouble(FileID)
    *Matrix44A\e33 = ReadDouble(FileID)
    *Matrix44A\e43 = ReadDouble(FileID)
    *Matrix44A\e14 = ReadDouble(FileID)
    *Matrix44A\e24 = ReadDouble(FileID)
    *Matrix44A\e34 = ReadDouble(FileID)
    *Matrix44A\e44 = ReadDouble(FileID)
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Write in Binary file <<<<<

  Procedure WriteMatrix44(FileID.i, *Matrix44A.Matrix44)
   
    WriteDouble(FileID, *Matrix44A\e11)
    WriteDouble(FileID, *Matrix44A\e21)
    WriteDouble(FileID, *Matrix44A\e31)
    WriteDouble(FileID, *Matrix44A\e41)
    WriteDouble(FileID, *Matrix44A\e12)
    WriteDouble(FileID, *Matrix44A\e22)
    WriteDouble(FileID, *Matrix44A\e32)
    WriteDouble(FileID, *Matrix44A\e42)
    WriteDouble(FileID, *Matrix44A\e13)
    WriteDouble(FileID, *Matrix44A\e23)
    WriteDouble(FileID, *Matrix44A\e33)
    WriteDouble(FileID, *Matrix44A\e43)
    WriteDouble(FileID, *Matrix44A\e14)
    WriteDouble(FileID, *Matrix44A\e24)
    WriteDouble(FileID, *Matrix44A\e34)
    WriteDouble(FileID, *Matrix44A\e44)
   
  EndProcedure

EndModule

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.002 seconds (326500.00 lines/second) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<


Feel free to explore capabilities Dev-Module as to offer. For the moment only simple data structure are supported with XML files related instructions. This program might not be for everyone.

EDIT #1 : Bug pointed out by Olliv fixed. You have to download the source again, sorry for the inconvenience.
EDIT #2 : Some modifications to fix a particular interference with some existing instruction. I have also included a project file.
EDIT #3 : Bug correction
EDIT #4 : Bug correction
EDIT #5 : Bug correction
EDIT #6 : Bug correction
EDIT #7 : Minor Modification about the Update() Methods
EDIT #8 : Source code at version 0.9.2, Getters and Setters added for the secondary instance
EDIT #9 : Bug correction
EDIT #10 : Bug correction
EDIT #11 : Source code at version 0.9.9, Regression in the XML file methods (I'm working on it)
EDIT #12 : Minor bug correction, Suppression of no longer needed procedures

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Last edited by StarBootics on Thu Aug 09, 2018 12:44 am, edited 12 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Mon Jun 11, 2018 7:55 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Tue Sep 22, 2009 10:41 pm
Posts: 293
There is a small avalanche bug here :
Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The Zero operator <<<<<
Procedure Zero(*Matrix44A.Matrix44)
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
*Matrix44A = 0.0
EndProcedure
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< The One operator <<<<<
Procedure One(*Matrix44A.Matrix44)
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
*Matrix44A = 1.0
EndProcedure


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Mon Jun 11, 2018 8:40 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Olliv wrote:
There is a small avalanche bug


Fixed, thanks for the reply.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Wed Jun 27, 2018 3:22 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Hello everyone,

I have corrected some bugs, see the first post for the download link.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Thu Jun 28, 2018 4:09 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Hello everyone,

Yet another bug correction, I'm pushing the envelope of the program and the bugs are coming out.
As always, see the first post for the download link.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Thu Jun 28, 2018 9:46 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jun 22, 2003 7:43 pm
Posts: 232
Location: Germany, Homburg (Saar)
Your code could be much simpler with a bit of static arrays and macro magic:
Code:
Structure Matrix44s
   e.d[16]
EndStructure

Macro e(i, j)
   e[j * 4 + i]
EndMacro

a.Matrix44s
For i = 0 To 3
   For j = 0 To 3
      a\e(i, j) = i + 4 * j
   Next
Next

For i = 0 To 3
   For j = 0 To 3
      Debug a\e(i, j)
   Next
Next

Now you can simplify many of your formulas through for loops and similar things.

_________________
Electronics, Crazy & Interesting Stuff, all that with text, image and sound? Click here!

The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Thu Jun 28, 2018 2:34 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
NicTheQuick wrote:
Your code could be much simpler with a bit of static arrays and macro magic:


I'm aware that the generated code is far from perfect in some cases but for small matrices (4X4 or less) I didn't want to use for loop for speed reasons. Furthermore in this case the matrices must be compatible with OpenGL matrices format. But in the future my intention was to generate code for larger matrices but this is just an aspect of Dev-Module capability. Maybe the Matrices example was not the best I have ever choose to demonstrate Dev-Module capabilities.

But thanks for your comment, very appreciated.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Sun Jul 01, 2018 3:50 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Hello everyone,

There is another example let's say you are creating a program and you want to save many parameter in a preference file.
Code:
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code generated by : Dev-Module - V0.9.1
; Project name : the project name here
; File name : File name here
; File Version : 0.0.0
; Programmation : In progress
; Programmed by :  StarBootics
; Creation Date : 30-06-2018
; Last update : 30-06-2018
; Coded for PureBasic : V5.70 beta 1
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule General

  Declare.l GetVersion()
  Declare.b GetAutoRelaod()
  Declare.b GetMemorizeWindow()
  Declare.s GetCurrentLanguage()
  Declare.s GetLanguageFile()
  Declare.s GetCurrentTheme()
  Declare.s GetSourceDirectory()
  Declare.b GetEnableBraceMatch()
  Declare.b GetEnableKeywordMatch()
  Declare.b GetEnableKeywordBolding()
  Declare.b GetEnableCaseCorrection()
  Declare.b GetEnableLineNumbers()
  Declare.b GetShowWhiteSpace()
  Declare.b GetShowIndentGuides()
  Declare.b GetAutoSave()
  Declare.b GetAutoSaveAll()
  Declare.b GetSaveSettingsMode()
  Declare.b GetRunOnce()
  Declare.b GetShowToolbar()
  Declare.b GetTabLength()
  Declare.b GetRealTab()
  Declare.b GetMemorizeCursor()
  Declare.b GetMemorizeMarkers()
  Declare.b GetLastFilePattern()
  Declare.b GetEnableMenuIcons()
  Declare.b GetDisplayFullPath()
  Declare.b GetNoSplashScreen()
  Declare.b GetAlwaysHideLog()
  Declare.b GetShowCompilerProgress()
  Declare.b GetUseHelpToolF1()
  Declare.b GetMonitorFileChanges()
  Declare.b GetUpdateCheckInterval()
  Declare.b GetUpdateCheckVersions()
  Declare.q GetLastUpdateCheck()
  Declare SetVersion(P_Version.l)
  Declare SetAutoRelaod(P_AutoRelaod.b)
  Declare SetMemorizeWindow(P_MemorizeWindow.b)
  Declare SetCurrentLanguage(P_CurrentLanguage.s)
  Declare SetLanguageFile(P_LanguageFile.s)
  Declare SetCurrentTheme(P_CurrentTheme.s)
  Declare SetSourceDirectory(P_SourceDirectory.s)
  Declare SetEnableBraceMatch(P_EnableBraceMatch.b)
  Declare SetEnableKeywordMatch(P_EnableKeywordMatch.b)
  Declare SetEnableKeywordBolding(P_EnableKeywordBolding.b)
  Declare SetEnableCaseCorrection(P_EnableCaseCorrection.b)
  Declare SetEnableLineNumbers(P_EnableLineNumbers.b)
  Declare SetShowWhiteSpace(P_ShowWhiteSpace.b)
  Declare SetShowIndentGuides(P_ShowIndentGuides.b)
  Declare SetAutoSave(P_AutoSave.b)
  Declare SetAutoSaveAll(P_AutoSaveAll.b)
  Declare SetSaveSettingsMode(P_SaveSettingsMode.b)
  Declare SetRunOnce(P_RunOnce.b)
  Declare SetShowToolbar(P_ShowToolbar.b)
  Declare SetTabLength(P_TabLength.b)
  Declare SetRealTab(P_RealTab.b)
  Declare SetMemorizeCursor(P_MemorizeCursor.b)
  Declare SetMemorizeMarkers(P_MemorizeMarkers.b)
  Declare SetLastFilePattern(P_LastFilePattern.b)
  Declare SetEnableMenuIcons(P_EnableMenuIcons.b)
  Declare SetDisplayFullPath(P_DisplayFullPath.b)
  Declare SetNoSplashScreen(P_NoSplashScreen.b)
  Declare SetAlwaysHideLog(P_AlwaysHideLog.b)
  Declare SetShowCompilerProgress(P_ShowCompilerProgress.b)
  Declare SetUseHelpToolF1(P_UseHelpToolF1.b)
  Declare SetMonitorFileChanges(P_MonitorFileChanges.b)
  Declare SetUpdateCheckInterval(P_UpdateCheckInterval.b)
  Declare SetUpdateCheckVersions(P_UpdateCheckVersions.b)
  Declare SetLastUpdateCheck(P_LastUpdateCheck.q)
  Declare Initialize()
  Declare Reset()
  Declare ReadPrefs(P_GroupName.s)
  Declare WritePrefs(P_GroupName.s)

EndDeclareModule

Module General

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Structure declaration <<<<<

  Structure Instance

    Version.l
    AutoRelaod.b
    MemorizeWindow.b
    CurrentLanguage.s
    LanguageFile.s
    CurrentTheme.s
    SourceDirectory.s
    EnableBraceMatch.b
    EnableKeywordMatch.b
    EnableKeywordBolding.b
    EnableCaseCorrection.b
    EnableLineNumbers.b
    ShowWhiteSpace.b
    ShowIndentGuides.b
    AutoSave.b
    AutoSaveAll.b
    SaveSettingsMode.b
    RunOnce.b
    ShowToolbar.b
    TabLength.b
    RealTab.b
    MemorizeCursor.b
    MemorizeMarkers.b
    LastFilePattern.b
    EnableMenuIcons.b
    DisplayFullPath.b
    NoSplashScreen.b
    AlwaysHideLog.b
    ShowCompilerProgress.b
    UseHelpToolF1.b
    MonitorFileChanges.b
    UpdateCheckInterval.b
    UpdateCheckVersions.b
    LastUpdateCheck.q

  EndStructure

  Global Instance.Instance

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The observators <<<<<

  Procedure.l GetVersion()

    ProcedureReturn Instance\Version
  EndProcedure

  Procedure.b GetAutoRelaod()

    ProcedureReturn Instance\AutoRelaod
  EndProcedure

  Procedure.b GetMemorizeWindow()

    ProcedureReturn Instance\MemorizeWindow
  EndProcedure

  Procedure.s GetCurrentLanguage()

    ProcedureReturn Instance\CurrentLanguage
  EndProcedure

  Procedure.s GetLanguageFile()

    ProcedureReturn Instance\LanguageFile
  EndProcedure

  Procedure.s GetCurrentTheme()

    ProcedureReturn Instance\CurrentTheme
  EndProcedure

  Procedure.s GetSourceDirectory()

    ProcedureReturn Instance\SourceDirectory
  EndProcedure

  Procedure.b GetEnableBraceMatch()

    ProcedureReturn Instance\EnableBraceMatch
  EndProcedure

  Procedure.b GetEnableKeywordMatch()

    ProcedureReturn Instance\EnableKeywordMatch
  EndProcedure

  Procedure.b GetEnableKeywordBolding()

    ProcedureReturn Instance\EnableKeywordBolding
  EndProcedure

  Procedure.b GetEnableCaseCorrection()

    ProcedureReturn Instance\EnableCaseCorrection
  EndProcedure

  Procedure.b GetEnableLineNumbers()

    ProcedureReturn Instance\EnableLineNumbers
  EndProcedure

  Procedure.b GetShowWhiteSpace()

    ProcedureReturn Instance\ShowWhiteSpace
  EndProcedure

  Procedure.b GetShowIndentGuides()

    ProcedureReturn Instance\ShowIndentGuides
  EndProcedure

  Procedure.b GetAutoSave()

    ProcedureReturn Instance\AutoSave
  EndProcedure

  Procedure.b GetAutoSaveAll()

    ProcedureReturn Instance\AutoSaveAll
  EndProcedure

  Procedure.b GetSaveSettingsMode()

    ProcedureReturn Instance\SaveSettingsMode
  EndProcedure

  Procedure.b GetRunOnce()

    ProcedureReturn Instance\RunOnce
  EndProcedure

  Procedure.b GetShowToolbar()

    ProcedureReturn Instance\ShowToolbar
  EndProcedure

  Procedure.b GetTabLength()

    ProcedureReturn Instance\TabLength
  EndProcedure

  Procedure.b GetRealTab()

    ProcedureReturn Instance\RealTab
  EndProcedure

  Procedure.b GetMemorizeCursor()

    ProcedureReturn Instance\MemorizeCursor
  EndProcedure

  Procedure.b GetMemorizeMarkers()

    ProcedureReturn Instance\MemorizeMarkers
  EndProcedure

  Procedure.b GetLastFilePattern()

    ProcedureReturn Instance\LastFilePattern
  EndProcedure

  Procedure.b GetEnableMenuIcons()

    ProcedureReturn Instance\EnableMenuIcons
  EndProcedure

  Procedure.b GetDisplayFullPath()

    ProcedureReturn Instance\DisplayFullPath
  EndProcedure

  Procedure.b GetNoSplashScreen()

    ProcedureReturn Instance\NoSplashScreen
  EndProcedure

  Procedure.b GetAlwaysHideLog()

    ProcedureReturn Instance\AlwaysHideLog
  EndProcedure

  Procedure.b GetShowCompilerProgress()

    ProcedureReturn Instance\ShowCompilerProgress
  EndProcedure

  Procedure.b GetUseHelpToolF1()

    ProcedureReturn Instance\UseHelpToolF1
  EndProcedure

  Procedure.b GetMonitorFileChanges()

    ProcedureReturn Instance\MonitorFileChanges
  EndProcedure

  Procedure.b GetUpdateCheckInterval()

    ProcedureReturn Instance\UpdateCheckInterval
  EndProcedure

  Procedure.b GetUpdateCheckVersions()

    ProcedureReturn Instance\UpdateCheckVersions
  EndProcedure

  Procedure.q GetLastUpdateCheck()

    ProcedureReturn Instance\LastUpdateCheck
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The mutators <<<<<

  Procedure SetVersion(P_Version.l)

    Instance\Version = P_Version

  EndProcedure

  Procedure SetAutoRelaod(P_AutoRelaod.b)

    Instance\AutoRelaod = P_AutoRelaod

  EndProcedure

  Procedure SetMemorizeWindow(P_MemorizeWindow.b)

    Instance\MemorizeWindow = P_MemorizeWindow

  EndProcedure

  Procedure SetCurrentLanguage(P_CurrentLanguage.s)

    Instance\CurrentLanguage = P_CurrentLanguage

  EndProcedure

  Procedure SetLanguageFile(P_LanguageFile.s)

    Instance\LanguageFile = P_LanguageFile

  EndProcedure

  Procedure SetCurrentTheme(P_CurrentTheme.s)

    Instance\CurrentTheme = P_CurrentTheme

  EndProcedure

  Procedure SetSourceDirectory(P_SourceDirectory.s)

    Instance\SourceDirectory = P_SourceDirectory

  EndProcedure

  Procedure SetEnableBraceMatch(P_EnableBraceMatch.b)

    Instance\EnableBraceMatch = P_EnableBraceMatch

  EndProcedure

  Procedure SetEnableKeywordMatch(P_EnableKeywordMatch.b)

    Instance\EnableKeywordMatch = P_EnableKeywordMatch

  EndProcedure

  Procedure SetEnableKeywordBolding(P_EnableKeywordBolding.b)

    Instance\EnableKeywordBolding = P_EnableKeywordBolding

  EndProcedure

  Procedure SetEnableCaseCorrection(P_EnableCaseCorrection.b)

    Instance\EnableCaseCorrection = P_EnableCaseCorrection

  EndProcedure

  Procedure SetEnableLineNumbers(P_EnableLineNumbers.b)

    Instance\EnableLineNumbers = P_EnableLineNumbers

  EndProcedure

  Procedure SetShowWhiteSpace(P_ShowWhiteSpace.b)

    Instance\ShowWhiteSpace = P_ShowWhiteSpace

  EndProcedure

  Procedure SetShowIndentGuides(P_ShowIndentGuides.b)

    Instance\ShowIndentGuides = P_ShowIndentGuides

  EndProcedure

  Procedure SetAutoSave(P_AutoSave.b)

    Instance\AutoSave = P_AutoSave

  EndProcedure

  Procedure SetAutoSaveAll(P_AutoSaveAll.b)

    Instance\AutoSaveAll = P_AutoSaveAll

  EndProcedure

  Procedure SetSaveSettingsMode(P_SaveSettingsMode.b)

    Instance\SaveSettingsMode = P_SaveSettingsMode

  EndProcedure

  Procedure SetRunOnce(P_RunOnce.b)

    Instance\RunOnce = P_RunOnce

  EndProcedure

  Procedure SetShowToolbar(P_ShowToolbar.b)

    Instance\ShowToolbar = P_ShowToolbar

  EndProcedure

  Procedure SetTabLength(P_TabLength.b)

    Instance\TabLength = P_TabLength

  EndProcedure

  Procedure SetRealTab(P_RealTab.b)

    Instance\RealTab = P_RealTab

  EndProcedure

  Procedure SetMemorizeCursor(P_MemorizeCursor.b)

    Instance\MemorizeCursor = P_MemorizeCursor

  EndProcedure

  Procedure SetMemorizeMarkers(P_MemorizeMarkers.b)

    Instance\MemorizeMarkers = P_MemorizeMarkers

  EndProcedure

  Procedure SetLastFilePattern(P_LastFilePattern.b)

    Instance\LastFilePattern = P_LastFilePattern

  EndProcedure

  Procedure SetEnableMenuIcons(P_EnableMenuIcons.b)

    Instance\EnableMenuIcons = P_EnableMenuIcons

  EndProcedure

  Procedure SetDisplayFullPath(P_DisplayFullPath.b)

    Instance\DisplayFullPath = P_DisplayFullPath

  EndProcedure

  Procedure SetNoSplashScreen(P_NoSplashScreen.b)

    Instance\NoSplashScreen = P_NoSplashScreen

  EndProcedure

  Procedure SetAlwaysHideLog(P_AlwaysHideLog.b)

    Instance\AlwaysHideLog = P_AlwaysHideLog

  EndProcedure

  Procedure SetShowCompilerProgress(P_ShowCompilerProgress.b)

    Instance\ShowCompilerProgress = P_ShowCompilerProgress

  EndProcedure

  Procedure SetUseHelpToolF1(P_UseHelpToolF1.b)

    Instance\UseHelpToolF1 = P_UseHelpToolF1

  EndProcedure

  Procedure SetMonitorFileChanges(P_MonitorFileChanges.b)

    Instance\MonitorFileChanges = P_MonitorFileChanges

  EndProcedure

  Procedure SetUpdateCheckInterval(P_UpdateCheckInterval.b)

    Instance\UpdateCheckInterval = P_UpdateCheckInterval

  EndProcedure

  Procedure SetUpdateCheckVersions(P_UpdateCheckVersions.b)

    Instance\UpdateCheckVersions = P_UpdateCheckVersions

  EndProcedure

  Procedure SetLastUpdateCheck(P_LastUpdateCheck.q)

    Instance\LastUpdateCheck = P_LastUpdateCheck

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Initialize operator <<<<<

  Procedure Initialize()
   
    Instance\Version = 0
    Instance\AutoRelaod = 0
    Instance\MemorizeWindow = 0
    Instance\CurrentLanguage = ""
    Instance\LanguageFile = ""
    Instance\CurrentTheme = ""
    Instance\SourceDirectory = ""
    Instance\EnableBraceMatch = 0
    Instance\EnableKeywordMatch = 0
    Instance\EnableKeywordBolding = 0
    Instance\EnableCaseCorrection = 0
    Instance\EnableLineNumbers = 0
    Instance\ShowWhiteSpace = 0
    Instance\ShowIndentGuides = 0
    Instance\AutoSave = 0
    Instance\AutoSaveAll = 0
    Instance\SaveSettingsMode = 0
    Instance\RunOnce = 0
    Instance\ShowToolbar = 0
    Instance\TabLength = 0
    Instance\RealTab = 0
    Instance\MemorizeCursor = 0
    Instance\MemorizeMarkers = 0
    Instance\LastFilePattern = 0
    Instance\EnableMenuIcons = 0
    Instance\DisplayFullPath = 0
    Instance\NoSplashScreen = 0
    Instance\AlwaysHideLog = 0
    Instance\ShowCompilerProgress = 0
    Instance\UseHelpToolF1 = 0
    Instance\MonitorFileChanges = 0
    Instance\UpdateCheckInterval = 0
    Instance\UpdateCheckVersions = 0
    Instance\LastUpdateCheck = 0
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Reset operator <<<<<

  Procedure Reset()
   
    Instance\Version = 0
    Instance\AutoRelaod = 0
    Instance\MemorizeWindow = 0
    Instance\CurrentLanguage = ""
    Instance\LanguageFile = ""
    Instance\CurrentTheme = ""
    Instance\SourceDirectory = ""
    Instance\EnableBraceMatch = 0
    Instance\EnableKeywordMatch = 0
    Instance\EnableKeywordBolding = 0
    Instance\EnableCaseCorrection = 0
    Instance\EnableLineNumbers = 0
    Instance\ShowWhiteSpace = 0
    Instance\ShowIndentGuides = 0
    Instance\AutoSave = 0
    Instance\AutoSaveAll = 0
    Instance\SaveSettingsMode = 0
    Instance\RunOnce = 0
    Instance\ShowToolbar = 0
    Instance\TabLength = 0
    Instance\RealTab = 0
    Instance\MemorizeCursor = 0
    Instance\MemorizeMarkers = 0
    Instance\LastFilePattern = 0
    Instance\EnableMenuIcons = 0
    Instance\DisplayFullPath = 0
    Instance\NoSplashScreen = 0
    Instance\AlwaysHideLog = 0
    Instance\ShowCompilerProgress = 0
    Instance\UseHelpToolF1 = 0
    Instance\MonitorFileChanges = 0
    Instance\UpdateCheckInterval = 0
    Instance\UpdateCheckVersions = 0
    Instance\LastUpdateCheck = 0
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Read preferences group <<<<<

  Procedure ReadPrefs(P_GroupName.s)

    PreferenceGroup(P_GroupName)
   
    Instance\Version = ReadPreferenceLong("Version", Instance\Version)
    Instance\AutoRelaod = ReadPreferenceLong("AutoRelaod", Instance\AutoRelaod)
    Instance\MemorizeWindow = ReadPreferenceLong("MemorizeWindow", Instance\MemorizeWindow)
    Instance\CurrentLanguage = ReadPreferenceString("CurrentLanguage", Instance\CurrentLanguage)
    Instance\LanguageFile = ReadPreferenceString("LanguageFile", Instance\LanguageFile)
    Instance\CurrentTheme = ReadPreferenceString("CurrentTheme", Instance\CurrentTheme)
    Instance\SourceDirectory = ReadPreferenceString("SourceDirectory", Instance\SourceDirectory)
    Instance\EnableBraceMatch = ReadPreferenceLong("EnableBraceMatch", Instance\EnableBraceMatch)
    Instance\EnableKeywordMatch = ReadPreferenceLong("EnableKeywordMatch", Instance\EnableKeywordMatch)
    Instance\EnableKeywordBolding = ReadPreferenceLong("EnableKeywordBolding", Instance\EnableKeywordBolding)
    Instance\EnableCaseCorrection = ReadPreferenceLong("EnableCaseCorrection", Instance\EnableCaseCorrection)
    Instance\EnableLineNumbers = ReadPreferenceLong("EnableLineNumbers", Instance\EnableLineNumbers)
    Instance\ShowWhiteSpace = ReadPreferenceLong("ShowWhiteSpace", Instance\ShowWhiteSpace)
    Instance\ShowIndentGuides = ReadPreferenceLong("ShowIndentGuides", Instance\ShowIndentGuides)
    Instance\AutoSave = ReadPreferenceLong("AutoSave", Instance\AutoSave)
    Instance\AutoSaveAll = ReadPreferenceLong("AutoSaveAll", Instance\AutoSaveAll)
    Instance\SaveSettingsMode = ReadPreferenceLong("SaveSettingsMode", Instance\SaveSettingsMode)
    Instance\RunOnce = ReadPreferenceLong("RunOnce", Instance\RunOnce)
    Instance\ShowToolbar = ReadPreferenceLong("ShowToolbar", Instance\ShowToolbar)
    Instance\TabLength = ReadPreferenceLong("TabLength", Instance\TabLength)
    Instance\RealTab = ReadPreferenceLong("RealTab", Instance\RealTab)
    Instance\MemorizeCursor = ReadPreferenceLong("MemorizeCursor", Instance\MemorizeCursor)
    Instance\MemorizeMarkers = ReadPreferenceLong("MemorizeMarkers", Instance\MemorizeMarkers)
    Instance\LastFilePattern = ReadPreferenceLong("LastFilePattern", Instance\LastFilePattern)
    Instance\EnableMenuIcons = ReadPreferenceLong("EnableMenuIcons", Instance\EnableMenuIcons)
    Instance\DisplayFullPath = ReadPreferenceLong("DisplayFullPath", Instance\DisplayFullPath)
    Instance\NoSplashScreen = ReadPreferenceLong("NoSplashScreen", Instance\NoSplashScreen)
    Instance\AlwaysHideLog = ReadPreferenceLong("AlwaysHideLog", Instance\AlwaysHideLog)
    Instance\ShowCompilerProgress = ReadPreferenceLong("ShowCompilerProgress", Instance\ShowCompilerProgress)
    Instance\UseHelpToolF1 = ReadPreferenceLong("UseHelpToolF1", Instance\UseHelpToolF1)
    Instance\MonitorFileChanges = ReadPreferenceLong("MonitorFileChanges", Instance\MonitorFileChanges)
    Instance\UpdateCheckInterval = ReadPreferenceLong("UpdateCheckInterval", Instance\UpdateCheckInterval)
    Instance\UpdateCheckVersions = ReadPreferenceLong("UpdateCheckVersions", Instance\UpdateCheckVersions)
    Instance\LastUpdateCheck = ReadPreferenceQuad("LastUpdateCheck", Instance\LastUpdateCheck)
   
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Write preferences group <<<<<

  Procedure WritePrefs(P_GroupName.s)

    PreferenceGroup(P_GroupName)
   
    WritePreferenceLong("Version", Instance\Version)
    WritePreferenceLong("AutoRelaod", Instance\AutoRelaod)
    WritePreferenceLong("MemorizeWindow", Instance\MemorizeWindow)
    WritePreferenceString("CurrentLanguage", Instance\CurrentLanguage)
    WritePreferenceString("LanguageFile", Instance\LanguageFile)
    WritePreferenceString("CurrentTheme", Instance\CurrentTheme)
    WritePreferenceString("SourceDirectory", Instance\SourceDirectory)
    WritePreferenceLong("EnableBraceMatch", Instance\EnableBraceMatch)
    WritePreferenceLong("EnableKeywordMatch", Instance\EnableKeywordMatch)
    WritePreferenceLong("EnableKeywordBolding", Instance\EnableKeywordBolding)
    WritePreferenceLong("EnableCaseCorrection", Instance\EnableCaseCorrection)
    WritePreferenceLong("EnableLineNumbers", Instance\EnableLineNumbers)
    WritePreferenceLong("ShowWhiteSpace", Instance\ShowWhiteSpace)
    WritePreferenceLong("ShowIndentGuides", Instance\ShowIndentGuides)
    WritePreferenceLong("AutoSave", Instance\AutoSave)
    WritePreferenceLong("AutoSaveAll", Instance\AutoSaveAll)
    WritePreferenceLong("SaveSettingsMode", Instance\SaveSettingsMode)
    WritePreferenceLong("RunOnce", Instance\RunOnce)
    WritePreferenceLong("ShowToolbar", Instance\ShowToolbar)
    WritePreferenceLong("TabLength", Instance\TabLength)
    WritePreferenceLong("RealTab", Instance\RealTab)
    WritePreferenceLong("MemorizeCursor", Instance\MemorizeCursor)
    WritePreferenceLong("MemorizeMarkers", Instance\MemorizeMarkers)
    WritePreferenceLong("LastFilePattern", Instance\LastFilePattern)
    WritePreferenceLong("EnableMenuIcons", Instance\EnableMenuIcons)
    WritePreferenceLong("DisplayFullPath", Instance\DisplayFullPath)
    WritePreferenceLong("NoSplashScreen", Instance\NoSplashScreen)
    WritePreferenceLong("AlwaysHideLog", Instance\AlwaysHideLog)
    WritePreferenceLong("ShowCompilerProgress", Instance\ShowCompilerProgress)
    WritePreferenceLong("UseHelpToolF1", Instance\UseHelpToolF1)
    WritePreferenceLong("MonitorFileChanges", Instance\MonitorFileChanges)
    WritePreferenceLong("UpdateCheckInterval", Instance\UpdateCheckInterval)
    WritePreferenceLong("UpdateCheckVersions", Instance\UpdateCheckVersions)
    WritePreferenceQuad("LastUpdateCheck", Instance\LastUpdateCheck)
   
  EndProcedure

EndModule

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.001 seconds (695000.00 lines/second) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<

In a case like this the only modification to the generated code will be the Initialize method with hard coded default values. Beside that, ready to use.
I hope this new example will bring more light about Dev-Module capabilities.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Sun Jul 01, 2018 7:23 am 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3311
Location: New Zealand
This looks really good StarBootics, though rather than show the output can you show the input
I just downloaded and looked at the source and see you've been really busy.
but I will have to put some time to look at it properly, always like your code.

_________________
Got winter blues?
Enjoy a Caravan Trip into, "The Land of Grey and Pink", wine and punk weed optional!
https://www.youtube.com/watch?v=9hmFzGTxod4


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Sun Jul 01, 2018 2:58 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
idle wrote:
This looks really good StarBootics, though rather than show the output can you show the input
I just downloaded and looked at the source and see you've been really busy.
but I will have to put some time to look at it properly, always like your code.

Thanks for your reply since you have ask for the input here they are :

First you enter the Module name then the fields you want :
https://www.dropbox.com/s/xy7yq2d784xm9s5/Input00.png?dl=0

After that you select the methods you want as you see fit :
https://www.dropbox.com/s/igoxp25ghp2bda0/Input01.png?dl=0
https://www.dropbox.com/s/x4u22cp5g0eyhhk/Input02.png?dl=0

And finally to get the source code you click on the "Generate Code" button. At this point you can save the source code or send it to the clipboard and paste it in the IDE.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Sun Jul 01, 2018 10:38 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Sep 21, 2007 5:52 am
Posts: 3311
Location: New Zealand
Thanks I just thought if you posted the Input people may take a proper look
There's a lot of potential in it and it could be very useful to the community
Hopefully I will have some time to have a look this week and see how flexible it is.

_________________
Got winter blues?
Enjoy a Caravan Trip into, "The Land of Grey and Pink", wine and punk weed optional!
https://www.youtube.com/watch?v=9hmFzGTxod4


Top
 Profile  
Reply with quote  
 Post subject: Re: Dev-Module
PostPosted: Tue Aug 07, 2018 12:04 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 344
Location: Canada
Hello everyone,

Just to let you know that I have updated the source code to Version 0.9.9. I have re-factory a large portion of the code, it was the only way to solve some problems.
The only bad point there is a serious regression about XML methods but I'm working on it.

See the first post for the download link.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye