On Thu, 3 Feb 2022 at 13:32, Avi Gross via Python-list <python-list@python.org> wrote: > > Jen, > > I would not be shocked at incompatibilities in the system described making it > hard to exchange anything, including text, but am not clear if there is a > limitation of four bytes in what can be shared. For me, a character string > can use any number of contiguous bytes in memory that some kind of pointer or > table lookup provides access to. > > Clearly you could squeeze larger number in by not writing decimals but using > hexadecimal notation that adds a to f as valid entries, and of course you can > make your own customized base 32 or if you use more symbols (such as upper > and lower case as different) you could add a few symbols and stretch it out > to base 60 or 64. > > Like I said, I may have missed something. If you KNOW that system A will > interact with systems B and C and so on, and each machine knows what kind it > is, and especially if it knows which kind of machine left it something in > shared memory, there has to be a way to coordinate between them. If character > strings in ASCII or UTF8 or EBCDIC or some kind of raw are allowed, and used > with just a few characters that can spell out numbers, I would think much is > possible. If needed, perhaps a fixed size could be set aside and the string > use a null terminator if shorter. > > Of course if this big-endian issue also scrambles bytes used in strings, > forget it. > > Or, maybe shared memory is not the easy way to go, even it it might be faster. >
Structs are fine, and are highly unlikely to be the OP's problem. Switching to a different system won't help. Unfortunately I can't offer any serious help about the actual problem, as I don't know what's going on with the shared memory issue. ChrisA -- https://mail.python.org/mailman/listinfo/python-list