Author Topic: Fehlermeldung bei DIM  (Read 159 times)

Offline Worebu

  • Mr. Polyvector
  • ***
  • Posts: 200
  • Seit gemoint liebe Gemeinde
    • View Profile
Fehlermeldung bei DIM
« on: 2021-Aug-29 »
Moin, ich habe wieder eine Fehlermeldung vom Compiler und weiß nicht weiter. Hat jemand eine Idee?

Code: (glbasic) [Select]
GPC - GLBasic Precompiler V.17.312 SN: 04eb7bb - 3D, NET
Wordcount:37 commands
compiling:
F:\Temp\glbasic\gpc_temp0.cpp: In function 'int __GLBASIC__::__MainGameSub_()':
F:\Temp\glbasic\gpc_temp0.cpp:26:18: error: no matching function for call to 'DIM(DGInt&, int, int, int)'
 DIM(uni, 35,35,35);
                  ^
In file included from F:\Temp\glbasic\gpc_temp.h:2:0,
                 from F:\Temp\glbasic\gpc_temp0.cpp:1:
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:825:25: note: candidate: template<class T> void __GLBASIC__::DIM(__GLBASIC__::DGArray<T>&, DGNat, DGNat, DGNat, DGNat)
 template <class T> void DIM(DGArray<T>& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0) {
                         ^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:825:25: note:   template argument deduction/substitution failed:
F:\Temp\glbasic\gpc_temp0.cpp:26:18: note:   mismatched types '__GLBASIC__::DGArray<T>' and 'DGInt {aka double}'
 DIM(uni, 35,35,35);
                  ^
In file included from F:\Temp\glbasic\gpc_temp.h:2:0,
                 from F:\Temp\glbasic\gpc_temp0.cpp:1:
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:942:9: note: candidate: void __GLBASIC__::DIM(__GLBASIC__::DGIntArray&, DGNat, DGNat, DGNat, DGNat)
 void    DIM(DGIntArray& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0);
         ^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:942:9: note:   no known conversion for argument 1 from 'DGInt {aka double}' to '__GLBASIC__::DGIntArray&'
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:943:9: note: candidate: void __GLBASIC__::DIM(__GLBASIC__::DGNatArray&, DGNat, DGNat, DGNat, DGNat)
 void    DIM(DGNatArray& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0);
         ^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:943:9: note:   no known conversion for argument 1 from 'DGInt {aka double}' to '__GLBASIC__::DGNatArray&'
F:\Temp\glbasic\gpc_temp0.cpp: In function 'void __GLBASIC__::Universum()':
F:\Temp\glbasic\gpc_temp0.cpp:100:10: error: '__GLBASIC__::uni' cannot be used as a function
 uni(x,y,z) = RND(400);
          ^
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 1.3 sek. Zeit: 10:29
Erstellen: 5 erfolgreich.
*** 16 FEHLGESCHLAGEN ***


Vielen Dank im voraus.
« Last Edit: 2021-Aug-29 by Worebu »
Intel I5 9600 - RTX 2080 Super, WaKü, 32GB RAM, 1x 512gb + 1x 1Gb NVRAM,  1x4TB + 1x1TB HD

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2732
    • View Profile
Re: Fehlermeldung bei DIM
« Reply #1 on: 2021-Aug-30 »
Can you post some code that produces the error Worebu?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)