hi let's say i have a structure
struct test {
int A;
char B[5];
int C;
};
this above structure defination always going to take 16 byte in
memeory in whatever manner we align the member variables while
declaring a variable to it .
because variable 'A' going to take 4 byte then four charachter of
array gonna take another 4 bytes but the remaining will take also 4
bytes due to four byte alignment nature of compiler .
and last four byte by integer C .
what i want is there any way i can start storing integer C just after
the storing completion of array B's last element i.e. B[4] , so that i
can suppress padding . Any program which make memory manager store in
the above manner is most welcome.
thanks priorly because i am sure i am gonna get innumerable answer to
it . 20 2257
Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome. thanks priorly because i am sure i am gonna get innumerable answer to it .
No, not portably. See: http://www.c-faq.com/struct/padding.html
Robert Gamble
On 18 Mar 2006 19:34:22 -0800, "Lalatendu Das" <la******@gmail.com>
wrote in comp.lang.c: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
No, you are completely wrong. It is going to occupy sizeof(struct
test) bytes in memory, no more and no less.
On two different compilers that I use that will be exactly 7 bytes. On
several other compilers that I use that will be 9 bytes, while on
others it will be 10.
because variable 'A' going to take 4 byte then four charachter of
Variable 'A' is going to occupy sizeof(int) bytes. On various
compilers that I use, that varies between 1 and 4 bytes. There may or
may not be padding bytes after 'A'.
array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
No, the array 'B' will not take 4 bytes and another 4 bytes, that is 8
bytes in total. Unlike everything else in your post, this is one
thing that is absolute. The array 'B' will occupy exactly 5 bytes, on
your compiler and on every C compiler that ever existed.
There might be padding bytes after 'B' before the start of the next
member. Perhaps that is what you are talking about. Those padding
bytes do not change the size of 'B', an array of 5 char will always
have a size of exactly 5 bytes.
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
What "memory manager"? There is no "memory manager" in C. The
compiler is allowed to insert padding after any member of a structure
to maintain alignment. On some hardware architectures, incorrect
alignment will cause a hardware trap that will shut down a program.
thanks priorly because i am sure i am gonna get innumerable answer to it .
C does not define any mechanism for a programmer to override the
compiler's alignment decisions. Your particular compiler might
provide some non-standard mechanism to do this. You need to ask in a
compiler specific support group to find out if this is so, or study
your compiler's documentation. Even if such a non-standard mechanism
is available, it can significantly slow down the program on some
architectures.
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
Not on some platforms. It is conceivable that this structure will take up no
more than 6 bytes on some platforms, with or without tightly packed members.
because variable 'A' going to take 4 byte
Says who?
then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler .
Again, says who?
and last four byte by integer C .
Again, says who?
Byte size (in bits), int size (in bytes), and alignment requirements are
compiler and platform specific, and my compiler and your compiler may differ
in any and all of the specifics.
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
That would take knowledge of how your compiler works, and what sort of options
it gives you.
You /might/ gain some economy of storage by re-arranging the members within
the structure so as to take advantage of your compiler's built-in alignment
requirements. For instance,
struct test {
int A;
int C;
char B[5];
};
might actually take less space, even without compiler options, than the
organization you suggested.
thanks priorly because i am sure i am gonna get innumerable answer to it .
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 ( http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEHNiWagVFX4UWr64RAmzbAKDfsX5onft4vltCCqjHxl QuJCAX+wCg9lMY
a71cSjn13xF0Klbb2khYa+A=
=BJZs
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lew Pitcher wrote: Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
Not on some platforms. It is conceivable that this structure will take up no more than 6 bytes on some platforms, with or without tightly packed members.
Oops. Make that "no more than 7 bytes on some platforms"
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 ( http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEHNjfagVFX4UWr64RAgcLAKDwTDodfvOFbfsUI1pbOv L4hvriJgCgiluS
iylhlsuEYd0OxDex1os3KjI=
=gQEL
-----END PGP SIGNATURE-----
Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
Ok, declare your struct like this:
struct test {
int A;
char B[5];
unsigned char C[sizeof (int)];
};
To read an int out of the non-aligned area, use this function:
int get_nonaligned_int(const unsigned char *b)
{
int i, temp;
unsigned char *a = (unsigned char *)&temp;
for(i = 0; i < sizeof temp; i++)
a[i] = b[i];
return temp;
}
To store an int into the non-aligned area, use this function:
void set_nonaligned_int(unsigned char *b, int value)
{
int i;
unsigned char *a = (unsigned char *)&value;
for(i = 0; i < sizeof value; i++)
b[i] = a[i];
}
For example:
int main(void)
{
struct test foo;
foo.A = 13;
strcpy(foo.B, "abcd");
set_nonaligned_int(foo.C, 42);
return 0;
}
--
Simon.
"Lalatendu Das" <la******@gmail.com> writes: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
Not necessarily. The size and alignment of type int are
implementation-specific.
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome. thanks priorly because i am sure i am gonna get innumerable answer to it .
<http://www.c-faq.com/>, question 2.12.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Lew Pitcher wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
Not on some platforms. It is conceivable that this structure will take up no more than 6 bytes on some platforms, with or without tightly packed members.
because variable 'A' going to take 4 byte
Says who?
then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler .
Again, says who?
and last four byte by integer C .
Again, says who?
Byte size (in bits), int size (in bytes), and alignment requirements are compiler and platform specific, and my compiler and your compiler may differ in any and all of the specifics.
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
That would take knowledge of how your compiler works, and what sort of options it gives you.
You /might/ gain some economy of storage by re-arranging the members within the structure so as to take advantage of your compiler's built-in alignment requirements. For instance,
struct test { int A; int C; char B[5]; };
might actually take less space, even without compiler options, than the organization you suggested.
Assuming ints are 4 bytes and require 4-byte alignment (as indicated by
the OP) I do not see how this could possibly take less space.
Robert Gamble
Simon Biber wrote: Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
Ok, declare your struct like this:
struct test { int A; char B[5]; unsigned char C[sizeof (int)]; };
If the original structure took 16 bytes on the OP's implementation I
find it very difficult to believe that your suggestion would change the
storage required since it would still need 3 bytes of padding on the
end to maintain the alignment requirements of A (which is required to
support an array of struct test).
Robert Gamble
Robert Gamble wrote: Simon Biber wrote:
Lalatendu Das wrote:
hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
Ok, declare your struct like this:
struct test { int A; char B[5]; unsigned char C[sizeof (int)]; };
If the original structure took 16 bytes on the OP's implementation I find it very difficult to believe that your suggestion would change the storage required since it would still need 3 bytes of padding on the end to maintain the alignment requirements of A (which is required to support an array of struct test).
That's true. If you want to eliminate the padding, use the same trick
for element A.
struct test {
unsigned char A[sizeof (int)];
char B[5];
unsigned char C[sizeof (int)];
};
--
Simon.
Jack Klein wrote: On 18 Mar 2006 19:34:22 -0800, "Lalatendu Das" <la******@gmail.com> wrote in comp.lang.c:
hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
No, you are completely wrong. It is going to occupy sizeof(struct test) bytes in memory, no more and no less.
On two different compilers that I use that will be exactly 7 bytes. On several other compilers that I use that will be 9 bytes, while on others it will be 10.
because variable 'A' going to take 4 byte then four charachter of
Variable 'A' is going to occupy sizeof(int) bytes. On various compilers that I use, that varies between 1 and 4 bytes. There may or may not be padding bytes after 'A'.
array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
No, the array 'B' will not take 4 bytes and another 4 bytes, that is 8 bytes in total. Unlike everything else in your post, this is one thing that is absolute. The array 'B' will occupy exactly 5 bytes, on your compiler and on every C compiler that ever existed.
There might be padding bytes after 'B' before the start of the next member. Perhaps that is what you are talking about. Those padding bytes do not change the size of 'B', an array of 5 char will always have a size of exactly 5 bytes.
Dumb question:
A "byte" need not be 8 bits in size, though it is under PCs right?
Simon Biber wrote: Robert Gamble wrote:
Simon Biber wrote:
Lalatendu Das wrote:
hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C .
what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
Ok, declare your struct like this:
struct test { int A; char B[5]; unsigned char C[sizeof (int)]; }; If the original structure took 16 bytes on the OP's implementation I find it very difficult to believe that your suggestion would change the storage required since it would still need 3 bytes of padding on the end to maintain the alignment requirements of A (which is required to support an array of struct test).
That's true. If you want to eliminate the padding, use the same trick for element A.
struct test { unsigned char A[sizeof (int)]; char B[5]; unsigned char C[sizeof (int)]; };
So how would you (portably) access A or C as an int?
Remember some architectures (Sparc for instance) fault at misaligned
access, and others will incur a significant runtime penalty.
--
Ian Collins.
"santosh" <sa*********@gmail.com> writes:
[...] Dumb question:
A "byte" need not be 8 bits in size, though it is under PCs right?
Right. A byte is CHAR_BIT bits; CHAR_BIT is required to be at least 8.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Ian Collins wrote: Simon Biber wrote: Robert Gamble wrote:
Simon Biber wrote:
Lalatendu Das wrote:
> hi let's say i have a structure > struct test { > int A; > char B[5]; > int C; > }; > this above structure defination always going to take 16 byte in > memeory in whatever manner we align the member variables while > declaring a variable to it . > because variable 'A' going to take 4 byte then four charachter of > array gonna take another 4 bytes but the remaining will take also 4 > bytes due to four byte alignment nature of compiler . > and last four byte by integer C . > > what i want is there any way i can start storing integer C just after > the storing completion of array B's last element i.e. B[4] , so that i > can suppress padding . Any program which make memory manager store in > the above manner is most welcome.
Ok, declare your struct like this:
struct test { int A; char B[5]; unsigned char C[sizeof (int)]; }; If the original structure took 16 bytes on the OP's implementation I find it very difficult to believe that your suggestion would change the storage required since it would still need 3 bytes of padding on the end to maintain the alignment requirements of A (which is required to support an array of struct test).
That's true. If you want to eliminate the padding, use the same trick for element A.
struct test { unsigned char A[sizeof (int)]; char B[5]; unsigned char C[sizeof (int)]; }; So how would you (portably) access A or C as an int?
Simon provided a pair of functions for accessing A and C in his
original post which I responded to.
Remember some architectures (Sparc for instance) fault at misaligned access, and others will incur a significant runtime penalty.
Robert Gamble
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Gamble wrote: Lew Pitcher wrote:
[snip] struct test { int A; int C; char B[5]; };
might actually take less space, even without compiler options, than the organization you suggested.
Assuming ints are 4 bytes and require 4-byte alignment (as indicated by the OP) I do not see how this could possibly take less space.
A starts on an int boundary, and takes up an int's worth of space. This means
that C now starts on an int boundary, and there is no padding between A and C.
Assuming that char alignment can be on a char boundary, then there is no
padding between C and B either. So, with this layout, we get a structure
without padding between it's members.
OTOH, with the original structure, struct test { int A; char B[5]; int C; };
there may be padding between the B and C members, in order to ensure that the
C member is aligned on an int boundary.
Thus, the alternative layout I suggested /can/ be smaller (because of less
padding) than the original layout.
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 ( http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEHX2BagVFX4UWr64RAiJeAKC5gga/8y0lbqXuRP7ZnZDxca0FwgCfbRVW
SXjEPPl3AWGwsq/ahL3IJOY=
=YTg7
-----END PGP SIGNATURE-----
Lew Pitcher wrote: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Robert Gamble wrote: Lew Pitcher wrote: [snip] struct test { int A; int C; char B[5]; };
might actually take less space, even without compiler options, than the organization you suggested.
Assuming ints are 4 bytes and require 4-byte alignment (as indicated by the OP) I do not see how this could possibly take less space.
A starts on an int boundary, and takes up an int's worth of space. This means that C now starts on an int boundary, and there is no padding between A and C. Assuming that char alignment can be on a char boundary, then there is no padding between C and B either. So, with this layout, we get a structure without padding between it's members.
There may not be padding *between* the members but there is going to be
padding after C which, in this case, will be the same amount of padding
that existed between B and C in the original structure.
Robert Gamble
Lew Pitcher wrote: Lalatendu Das wrote:
hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it .
Not on some platforms. It is conceivable that this structure will take up no more than 6 bytes on some platforms, with or without tightly packed members.
No, with a CHAR_BIT of 16 it could conceivably take as little as 7
bytes, but with any smaller CHAR_BIT it will require at least 9
bytes. I would then expect at least one byte of padding for most
systems, making the expected minimum size 10. The more usual
systems will require 16 bytes.
--
Some informative links:
news:news.announce.newusers http://www.geocities.com/nnqweb/ http://www.catb.org/~esr/faqs/smart-questions.html http://www.caliburn.nl/topposting.html http://www.netmeister.org/news/learn2quote.html
Robert Gamble wrote:
.... snip ... There may not be padding *between* the members but there is going to be padding after C which, in this case, will be the same amount of padding that existed between B and C in the original structure.
The only reason for this reply is that the misspelling in the
subject has been driving me mad. Mad, as in insane, or totally
discombobulated, I tell you.
I rejected quarry and quail as possible corrections.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Simon Biber <ne**@ralmin.cc> writes: Lalatendu Das wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; }; this above structure defination always going to take 16 byte in memeory in whatever manner we align the member variables while declaring a variable to it . because variable 'A' going to take 4 byte then four charachter of array gonna take another 4 bytes but the remaining will take also 4 bytes due to four byte alignment nature of compiler . and last four byte by integer C . what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding . Any program which make memory manager store in the above manner is most welcome.
Ok, declare your struct like this:
struct test { int A; char B[5]; unsigned char C[sizeof (int)]; };
[...]
The compiler is still free to insert padding between B and C, or after
C, either because it can make the code potentially more efficient (for
example, memcpy() might be faster for aligned character arrays) or
because the compiler writer was in a funny mood that day.
If you want to fully control the layout of a structure, declare the
whole thing as an array of unsigned char, define the offsets and sizes
yourself, and write your own code to extract whatever data you need.
That's the only truly portable way to match an externally defined data
layout (assuming consistent byte sizes, and assuming you're dealing
correctly with byte ordering).
Or you can use some compiler-specific tricks to control the layout
(which will almost certainly result in slower code).
But the real question (to which I don't recall seeing an answer) is
*why* the OP wants to eliminate padding between the structure members.
The compiler inserts that padding for very good reasons; are you sure
that you know better than the compiler does how the structure should
be laid out? Quite possibly you do, in which case you'll need to do
something non-portable and/or ugly -- but if you just have a general
idea that you want to save space, consider letting the compiler do its
job.
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
On 2006-03-19, Lalatendu Das <la******@gmail.com> wrote: hi let's say i have a structure struct test { int A; char B[5]; int C; };
[...] what i want is there any way i can start storing integer C just after the storing completion of array B's last element i.e. B[4] , so that i can suppress padding.
#pragma pack(1)
struct test
{
int A;
char B[5];
int C;
};
#pragma pack()
will do what you want; this works with at least gcc 4, some Microsoft
compilers and perhaps some others.
It is not standard or portable, and everything everyone else has said
about asking yourself why you really want this goes.
Also, watch out for address alignment problems if you do this kind of
thing. Compilers have good reasons for padding structs!
On Sun, 19 Mar 2006 13:08:08 -0500, CBFalconer <cb********@yahoo.com>
wrote: The only reason for this reply is that the misspelling in the subject has been driving me mad. Mad, as in insane, or totally discombobulated, I tell you.
I rejected quarry and quail as possible corrections.
It is possible that a "querry" is a pre-electronic version of an
equerry. That would be someone who cares for the horses of royalty but
who cannot do so at a distance. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Amarendra |
last post by:
Folks,
This structure padding issue is bothering me now, could
not locate a satisfactory answer on clc, so here it goes...
I have a structure, given below:
typedef struct {
int flag;
char...
|
by: Sachin |
last post by:
typdef struct
{
int i;
char ch;
}str;
str str_var;
char x, y;
main()
{
//do nothing
|
by: kyle york |
last post by:
Greetings,
Why does the C standard require the members of a structure not be
re-ordered (6.2.5.20)? Padding is allowed, and platform dependent, which
means one cannot rely on the exact layout...
|
by: junky_fellow |
last post by:
Can somebody please tell me about the structure alignment rules ?
What I found was that on my system (cygwin running on PC, size of
int=4 sizeof long=4, size of long long = 8) the cygwin compiler...
|
by: karthikbalaguru |
last post by:
Hi,
I find that the structure padding is not being taken into account
while using 'new' operator.
Is there a way to enable it ?
struct Dataunit
{
char dataid;
int keyid;
|
by: Rohit kumar Chandel |
last post by:
Hi All,
Please let me know how to find in a structure whether compiler has used
padding or not.
Regards
Rohit
|
by: Kislay |
last post by:
case 1 :
struct s
{
char c1; // 8
double d; // 8
int i1; // 4
char c2; // 4
int i2; // 4
};
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |