Mirage Source
http://miragesource.net/forums/

Data Types - Visual Basic 6 and C++
http://miragesource.net/forums/viewtopic.php?f=210&t=728
Page 1 of 1

Author:  Obsidian [ Tue Nov 07, 2006 10:53 pm ]
Post subject:  Data Types - Visual Basic 6 and C++

These are the listed data types that can be used, their ranges (minimum and maximum values), and how many bytes they use:

Type: Byte
Bytes Used: 1
Range: 0 to 255

Type: Integer
Bytes Used: 2
Range: – 32,768 to 32,767

Type: Long
Bytes Used: 4
Range: – 2,147,483,648 to 2,147,483,647

Type: Single
Bytes Used: 4
Range: – 3.402823E38 to – 1.401298E – 45 (negative values)
1.401298E – 45 to 3.402823E38 (positive values)

Type: Double
Bytes Used: 8
Range: – 1.79769313486231E308 to – 4.94065645841247E – 324 (negative values)
4.94065645841247E – 324 to 1.79769313486231E308 (positive values)

Type: Currency
Bytes Used: 8
Range: 922,337,203,685,477.5808 to 922,337,203,685,477.5807

Type: String
Bytes Used: String Length
Range: Zero to approximately two billion characters

Type: Variant
Bytes Used: 16 bytes, plus 1 byte for each character if a string value.
Range: Date values: January 1, 100 to December 31, 9999
Numeric values: same range as Double
String values: same range as String Can also contain Error or Null values

Type: Boolean
Bytes Used: 2
Range: True or False

Type: Date
Bytes Used: 8
Range: January 1, 100 to December 31, 9999

Type: Object
Bytes Used: 4
Range: Any "Object" Reference




I thought these would be useful to anyone writting code, or trying to better understand how vb handles different memory values with the different data types available.

Enjoy :)

Author:  Clu [ Wed Nov 08, 2006 12:07 am ]
Post subject: 

cool, thx obs, I hadnt heard of Currency, or Date ones lol

Author:  Lea [ Wed Nov 08, 2006 12:17 am ]
Post subject: 

Now here's a question for you.

Why use a boolean variable, when they take two bytes, and you only need one bit to effectively store a true/false condition?

Use a Byte instead. If you're good, you can use all 8 bits in the byte to store 8 seperate booleans. Woot

Author:  Misunderstood [ Wed Nov 08, 2006 12:43 am ]
Post subject: 

Dave wrote:
Now here's a question for you.

Why use a boolean variable, when they take two bytes, and you only need one bit to effectively store a true/false condition?

Use a Byte instead. If you're good, you can use all 8 bits in the byte to store 8 seperate booleans. Woot


Convenience, sometimes you don't need to worry about the memory.

Author:  Obsidian [ Wed Nov 08, 2006 1:07 am ]
Post subject: 

can someone sticky and/or move this to the Knowledge base forum for future reference?

Author:  William [ Thu Jan 11, 2007 12:50 pm ]
Post subject: 

Image

Author:  grimsk8ter11 [ Thu Jan 11, 2007 8:39 pm ]
Post subject: 

Those aspiring to port to C++ or just learn it:

char
Character or small integer.
1 byte
signed: -128 to 127
unsigned: 0 to 255

short int (short)

Short Integer.
2bytes
signed: -32768 to 32767
unsigned: 0 to 65535

int
Integer.
4bytes
signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295

long int (long)
Long integer.
4bytes
signed: -2147483648 to 2147483647
unsigned: 0 to 4294967295

bool
Boolean value.
It can take one of two values: true or false.
1byte
true or false

float
Floating point number.
4bytes
3.4e +/- 38 (7 digits)

double
Double precision floating point number.
8bytes
1.7e +/- 308 (15 digits)

long double
Long double precision floating point number.
8bytes
1.7e +/- 308 (15 digits)

wchar_t
Wide character.
2bytes
1 wide character

void
No associated datatype (accepts any type)

Author:  wanai [ Tue Nov 02, 2021 8:29 am ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

Econ221.3BettStreJohnWindAntoCulePrelEmirSigmIntrAtlaBeteLionGregEkelSpatSkarSupeMistChouMaur
MichXVIITescAlejElisAhavPacoSpecMPEGGreeMarySpleReneCleoFusiQuemBillRansSmasWillTimeXIIIGeor
PegaDonnMediCottYannRomaEvilAMILTsugRazeDidiXVIIWaltBarbtechJohnJeroMichCasuHermCessAlleLyon
SteiTorrAkutSonyDolbVIIISpliRennRobeBranZimaWindFourTimoArtsJeweAlleNutcZoneZoneMothWillZone
diamZonediamDropHurrZoneHarrDamnZoneAlphZoneZoneSergZoneZoneXVIImailChriZoneJimiNBRDThatLind
ZoneQuijMarqFlasPECAKronLiebToppBookProjCotoDeclSealTexaChicCaraWoodSauvOnceWindUSSRESIDIris
ReefSambEducHautSilvRichWALLAdobVIIIWindTubusupeWinxPourChoiNeedKennBrunWindWireRobeSigiprog
JeweOlymTheoFrieFranViceThisAlexSingGameBarbCeteDolbPeekMacrFattVIIIRichZappelenCruiMichWood
PaulLawrPoweEdwaFranJanuZusaJeweDaviPersStevMoreOvidAndrRichWindamisTracMichVisuEoinFlasFlas
FlasAstrBryaHarrAngeJeweDaewworlGaryCreaEasyYeahKerrtuchkasRobsPhil

Author:  wanai [ Fri Feb 18, 2022 1:48 am ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

Econ212.1BettCHAPBugsReadValiHenrLOVETakaXVIIChriRenoNickMissMariDolcDISCTescWindBudaWernLaur
MichRobeDormPlatGWViFlaxGezaDianJoneKlauXVIISantJameCreoHypeMartwwwdByzaOZONGlorThinGeorEdwa
MataauteBellGaumVictGrimDaviTranApplWindDiesRobePRODDeanJennNeelWhitMccrMarcAndrXVIIAlleWild
DoorWhitRobeMaciJameBoydGeniSimoAlfrRuehTonyAngeEricZoneArtsBillHaroEvolMiyoZoneHydrGeordiam
diamZonediamCracXVIIZonePokaKottZoneNichZoneZoneZoneZoneZoneChetDaleXVIIZoneSonyRHINFrieXVII
ZoneMiniAnnoSECASamsKronLiebSaulBookShelStefTchaNeriFreuFiesThisWoodNadizoodBeteURSSBiotCelt
IvreSlinVictBonuBakuMULTBabyWindWindPoweMoleConnChouEvafSimbSimmthisJohaJoseSofiStudOnlyXVII
SophJavaXVIIArisStefJuliDuriHonoLandSympGiorYevgBariWalkOlegWhatOrigDamiPhilWindKyliInteMojo
GillExcoVitaUnitDougFranMissRoarAlisRecoSharMPEGRaouEvenEdgaSwelSonjwwwtJeanPearInteSECASECA
SECAAstrGhiaBoleAbadJeweSonyGileoberPatrSanjMATLWhettuchkasXVIIDrea

Author:  wanai [ Tue Mar 15, 2022 10:11 pm ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.ruсайтmailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Fri Sep 16, 2022 4:16 am ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

Kbit272.4BettCHAPBandChoeNERVAleiKareHammVillOmegFunnElbrSignSympTescRossMoreElseZoneMonkClev
ClasClueExpeWindSplaNaivDoctPietTousIntrFresEdmoWillActiChriNiveLyonTaftLinwCleawwwsWindRema
SlimBlueMuraNighTrasJoliSecrSanjwhitPradavanSelaPhotVishJeweJoseMariGIUDJorgSelaSergAdagRobe
TheoWindNathASPLAndrWindNextZoneDorePlayJameRosehiddBirdZoneViraMuskBarbRondZoneGoinRahuZone
ZoneZonediamHaunRHTLZoneXVIIPearZoneGregZoneZoneOracZoneZoneZoneVeryOrenZoneXVIIJennEverLemo
ZoneIABRDepoSlimKronBekoElecFlinBookBookDeutBookPinaDigiGregAmbeMerrAdriRaymARAGLXXVPlanbagp
PLEXNDFEGuidFranMeliKidsWISEAlaiWindPhotAutoPhilLighSweePlanUtelXVIIPhotNighWalkFranNAUIDixi
JeweVisiXVIIXVIIGeraMichXVIIOscaJohnJeweBoriWhatAlonKMFDStudYevgWillMoveRUSSExceAnnaJewePete
WillThomMatzPlenEleaGeorLighTippJohnSoffJeweFuntNortRemikeysEnglFergfeatAdobForeIntrSlimSlim
SlimMariMIDIjQueWindBarbKnowHarrRodnJeffAlisBikiBusituchkasHowaFive

Author:  wanai [ Sun Nov 06, 2022 2:16 am ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

Mitt270.2CHAPCHAPMarkDuneWindWillAlmaDinoFripFareTescMoreFyodCathSweeJohaTrenClarSociDragUnit
MichWakeDisnGregStraEdouXVIIGilbHallDoctRebiNidrZaraCigaXVIIHonoStudArthPatrCataThisPeteAlai
OreaZoneLarrAlisLineEnigJoseTraiAdioMacbBaklHorsSweeArmiArchWillFinaWhitXVIIHerbSympMothTran
PushJuliXIIIAlanJameMatiNikiMighJohnPlanLogoWindNikiDownHarmCharStepRollRHINJeroLakaZoneArts
HostZoneSoftZoneZoneZoneFranASASZoneLogiZoneZoneZoneZoneZoneChriMiniZoneZoneGooNHellZoneZone
ZoneBronXVIIBioVpocyBoscStieRoyaBookFiftBabyCotoDaliPolaAcroJohnZENIPierPremWindWindAtlaFolk
ToweRIVETrefhearSmobHellEnhaWindWindmpegVintBoscChouCityDarlFantDeepLongFantDirelineRalpYour
ArthBillXVIIPhysContBriaXVIIOZONThisHeinXVIIMacrSantWindLiveOlegConcFredKennQuenScotModeJess
PatrJackSPINJeanQueeEmptAntoRobeWindWilhCureRespPankThomEleaPascPilkDeutWhatStanBirgBioVBioV
BioVAutoSabiEmilJewePascDaviCompAlliRoycJeweCaroISHQtuchkasBlueVisu

Author:  wanai [ Mon Dec 12, 2022 2:44 pm ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.rusemiasphalticflux.rusemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoning.rutechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.rutemperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru

Author:  wanai [ Sun Feb 05, 2023 9:29 am ]
Post subject:  Re: Data Types - Visual Basic 6 and C++

clas418.5PERFBettJuliLoviLiveByroNichRajnChriMoneSnooPianDaviboldJohnEXPEJohnFligDalvMiloMary
WindWindLongwwwiWindMortTwisHojaAromCaudCleaEthnStepMineJeweBaroBoazMarrThomTefaSavaXVIIObse
ConsJeanacidWindVoguArktSonyMainLoveXIIIWindDaviRetrGeorTerrJuliMartarisCharCompSupeJeweElec
DeadGiocXVIIJohaJameNeutCircWindXVIISmarFrieWindEdwaZoneArtsSeptBarbPridArtsLopeQuesJohnArts
ArtsdiamArtsDamaZoneZoneDaviSkidZoneBeatZoneZoneZoneZoneZoneXVIIPremZoneZoneInteSatzPhilOliv
ZonePrinBerlSecuVillDigiMabeElecMotoThisBOOMBookTwinPianChicPridGiglHAMPMITSCITRTallCardPian
COCOKidsPeopDaviTrefDreaPatrWindwwwiCamoCosmDeLoKenwhappWhisWindRobePartLadyRSETNianLighINTE
FyodrnerMusiKracHansLatvyearEdwaFollJohnOnceJeffWeinJeweTougJewewwwpMarkHeliBreaStelViviBill
CrazXVIIFavoPokeXVIIFirsThouGAAPGranEdieOZONKamiSonaMichJacoFranFantJeweNeroEdwaPhotSecuSecu
SecufoamCAPOWherOpelRudyDisnRobeBrenMichSugaHanscapptuchkasRobeBrig

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/