Android Question Maximum length of a variable in b4A

beelze69

Active Member
Licensed User
Longtime User
Hi !

Sorry if I sound too basic.

What is the maximum length of a variable in b4A ?

Note: I tried giving this declaration like
Dim strThisWillHoldTheItemDescription as String

- and the Compiler did not give me any error..

I just want to know what is the maximum length that is allowed

Thanks..
 
Last edited:

emexes

Expert
Licensed User
a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
Lol, gotta love ground truth ? but you've got me wondering: are all characters of the name significant? Early BASICs were limited to one or two significant letters, eg Fred$ and Frank$ were the same variable. I vaguely remember 31 characters being a limit somewhere too, might have been TurboPascal. Is your test variable actually a separate variable to say:

a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a2345678901234567890123456789012345678901234567890a23456789012345678901234567890123456789012345678901234567890123456789012345678901234567890luca1234567890
 
Upvote 0

emexes

Expert
Licensed User
B4X:
dim Privacy_Policy_This_Privacy_Policy_describes_Our_policies_and_procedures_on_the_collection_use_and_disclosure_of_Your_information_when_You_use_the_Service_and_tells_You_about_Your_privacy_rights_and_how_the_law_protects_You_We_use_Your_Personal_data_to_provide_and_improve_the_Service_By_using_the_Service_You_agree_to_the_collection_and_use_of_information_in_accordance_with_this_Privacy_Policy_The_words_of_which_the_initial_letter_is_capitalized_have_meanings_defined_under_the_following_conditions_The_following_definitions_shall_have_the_same_meaning_regardless_of_whether_they_appear_in_singular_or_in_plural As String = "" ' Obviously shortened here, should be much longer - but that's ok because Java can apparently use unlimited-length identifiers. By the way, why did you scroll all the way over here, have you nothing better to do? :)

' Add reflector code to get variable name

' Add code to replace underscores with whitespace and whatnot
Sorry for derailing the thread.
That reminds me of a guy years ago who compressed supposedly non-compressible data by saving some of the data in the compressed-data filename (or perhaps filenames - if the compressor output can be multiple files, then you could compress any amount of data down to any arbitrary total file size eg even a single byte, if the filesystem allows zero-length files).

I feel like that happened in a magazine competition or challenge for readers to submit their best compression algorithm.

Say, that wasn't you, was it?!?! :cool:
 
Upvote 0

emexes

Expert
Licensed User
That reminds me of a guy years ago who compressed supposedly non-compressible data by saving some of the data in the compressed-data filename (or perhaps filenames - if the compressor output can be multiple files, then you could compress any amount of data down to any arbitrary total file size eg even a single byte, if the filesystem allows zero-length files).

I feel like that happened in a magazine competition or challenge for readers to submit their best compression algorithm.
Was probably this:

The $5000 Compression Challenge

> I am curious, though, and I am not trying to get any sort of angle on you here, what
> brilliant idea have you come up with that makes you think you can compress arbitrary
> data? Whether or whatever you disclose won't affect this challenge and I will live
> up to my end of the bargain regardless.


Wait and see...

Patrick
 
Upvote 0
Top