We will not shift responsibility from the compiler to some "wrong task".
The inability to declare a structure larger than two gigabytes is a bug in the compiler, but not the wrong task at all.
error 51: User Defined Type too big
Re: error 51: User Defined Type too big
An elementary structure > 2 GB seems nonsense to us.
Maybe your structure (> 2 GB) can be considered as the repetition of N elementary blocks (each block being < 2 GB).
So, you can only declare the structure for the elementary block and then define an array of elementary blocks.
(you still haven't answered our last questions)
Maybe your structure (> 2 GB) can be considered as the repetition of N elementary blocks (each block being < 2 GB).
So, you can only declare the structure for the elementary block and then define an array of elementary blocks.
(you still haven't answered our last questions)
-
- Posts: 606
- Joined: Nov 28, 2012 1:27
- Location: CA, USA moving to WA, USA
- Contact:
Re: error 51: User Defined Type too big
The OP is asking about how to implement his desire in programming.
He is not asking that his application intent be judged. That is his choice.
He is not asking that his application intent be judged. That is his choice.
Re: error 51: User Defined Type too big
Well, whatever his desire is (he's never been clear on that and refuses to answer direct questions about it), using a large structure is simply not a workable way to do it "in programming" with FB. If he wants to do it this way with FB he'll have to modify the compiler to suit his needs. There's no compelling reason for limited developer time to be spent on this for an improbable use case. They don't owe us anything. Let's not forget they are volunteers.
@erik refuses to answer even basic questions about his actual data structures. As was noted C compilers even do not support arbitrarily large structures. There are far better ways of doing things if only he'd tell us what he wants to do so we can help. It's easier and more elegant to alter our programming ways to fit within the constraints of the compiler and language than to try to bend the compiler to accept our own brute force methods. It's far more pleasant anyway.
@erik refuses to answer even basic questions about his actual data structures. As was noted C compilers even do not support arbitrarily large structures. There are far better ways of doing things if only he'd tell us what he wants to do so we can help. It's easier and more elegant to alter our programming ways to fit within the constraints of the compiler and language than to try to bend the compiler to accept our own brute force methods. It's far more pleasant anyway.
-
- Posts: 507
- Joined: Jan 13, 2009 19:23
Re: error 51: User Defined Type too big
I thinks we can do better
Code: Select all
type CForm1 Extends CForm
private:
As CBUTTON Command1(100) ' this is allowed or As CBUTTON ptr Command1(any)
Declare Static Sub Command1_MouseDown(ByRef sender As object,Button As Integer, Shift As Integer, X As Integer, Y As Integer)
public:
Declare Constructor()
End type
' to manage the memory and to simplify thinks . It will be better to have this
type CForm1 Extends CForm
private:
As CBUTTON Command1(Any) ' this is not alowed
Declare Static Sub Command1_MouseDown(ByRef sender As object,Button As Integer, Shift As Integer, X As Integer, Y As Integer)
public:
Declare Constructor()
End type
' some where in the code you can write ReDim Preserve Command1(0 To N+1)