Mirage Source

Free ORPG making software.
It is currently Sat Apr 27, 2024 2:32 am

All times are UTC




Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Tue Nov 07, 2006 10:53 pm 
Offline
Pro

Joined: Mon May 29, 2006 2:15 am
Posts: 368
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 :)

_________________
Image
Image
The quality of a man is not measured by how well he treats the knowledgeable and competent, but rather how he treats those less fortunate than himself.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 08, 2006 12:07 am 
Offline
Regular

Joined: Fri Jul 28, 2006 9:20 pm
Posts: 39
Location: <--soemwhere in that general direction
cool, thx obs, I hadnt heard of Currency, or Date ones lol


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 08, 2006 12:17 am 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
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

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 08, 2006 12:43 am 
Offline
Pro

Joined: Mon May 29, 2006 1:40 pm
Posts: 430
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 08, 2006 1:07 am 
Offline
Pro

Joined: Mon May 29, 2006 2:15 am
Posts: 368
can someone sticky and/or move this to the Knowledge base forum for future reference?

_________________
Image
Image
The quality of a man is not measured by how well he treats the knowledgeable and competent, but rather how he treats those less fortunate than himself.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 12:50 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Image

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 8:39 pm 
Offline
Pro

Joined: Mon May 29, 2006 2:58 pm
Posts: 370
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)

_________________
Image


Top
 Profile  
 
PostPosted: Tue Nov 02, 2021 8:29 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
Econ221.3BettStreJohnWindAntoCulePrelEmirSigmIntrAtlaBeteLionGregEkelSpatSkarSupeMistChouMaur
MichXVIITescAlejElisAhavPacoSpecMPEGGreeMarySpleReneCleoFusiQuemBillRansSmasWillTimeXIIIGeor
PegaDonnMediCottYannRomaEvilAMILTsugRazeDidiXVIIWaltBarbtechJohnJeroMichCasuHermCessAlleLyon
SteiTorrAkutSonyDolbVIIISpliRennRobeBranZimaWindFourTimoArtsJeweAlleNutcZoneZoneMothWillZone
diamZonediamDropHurrZoneHarrDamnZoneAlphZoneZoneSergZoneZoneXVIImailChriZoneJimiNBRDThatLind
ZoneQuijMarqFlasPECAKronLiebToppBookProjCotoDeclSealTexaChicCaraWoodSauvOnceWindUSSRESIDIris
ReefSambEducHautSilvRichWALLAdobVIIIWindTubusupeWinxPourChoiNeedKennBrunWindWireRobeSigiprog
JeweOlymTheoFrieFranViceThisAlexSingGameBarbCeteDolbPeekMacrFattVIIIRichZappelenCruiMichWood
PaulLawrPoweEdwaFranJanuZusaJeweDaviPersStevMoreOvidAndrRichWindamisTracMichVisuEoinFlasFlas
FlasAstrBryaHarrAngeJeweDaewworlGaryCreaEasyYeahKerrtuchkasRobsPhil


Top
 Profile  
 
PostPosted: Fri Feb 18, 2022 1:48 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
Econ212.1BettCHAPBugsReadValiHenrLOVETakaXVIIChriRenoNickMissMariDolcDISCTescWindBudaWernLaur
MichRobeDormPlatGWViFlaxGezaDianJoneKlauXVIISantJameCreoHypeMartwwwdByzaOZONGlorThinGeorEdwa
MataauteBellGaumVictGrimDaviTranApplWindDiesRobePRODDeanJennNeelWhitMccrMarcAndrXVIIAlleWild
DoorWhitRobeMaciJameBoydGeniSimoAlfrRuehTonyAngeEricZoneArtsBillHaroEvolMiyoZoneHydrGeordiam
diamZonediamCracXVIIZonePokaKottZoneNichZoneZoneZoneZoneZoneChetDaleXVIIZoneSonyRHINFrieXVII
ZoneMiniAnnoSECASamsKronLiebSaulBookShelStefTchaNeriFreuFiesThisWoodNadizoodBeteURSSBiotCelt
IvreSlinVictBonuBakuMULTBabyWindWindPoweMoleConnChouEvafSimbSimmthisJohaJoseSofiStudOnlyXVII
SophJavaXVIIArisStefJuliDuriHonoLandSympGiorYevgBariWalkOlegWhatOrigDamiPhilWindKyliInteMojo
GillExcoVitaUnitDougFranMissRoarAlisRecoSharMPEGRaouEvenEdgaSwelSonjwwwtJeanPearInteSECASECA
SECAAstrGhiaBoleAbadJeweSonyGileoberPatrSanjMATLWhettuchkasXVIIDrea


Top
 Profile  
 
PostPosted: Tue Mar 15, 2022 10:11 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
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


Top
 Profile  
 
PostPosted: Fri Sep 16, 2022 4:16 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
Kbit272.4BettCHAPBandChoeNERVAleiKareHammVillOmegFunnElbrSignSympTescRossMoreElseZoneMonkClev
ClasClueExpeWindSplaNaivDoctPietTousIntrFresEdmoWillActiChriNiveLyonTaftLinwCleawwwsWindRema
SlimBlueMuraNighTrasJoliSecrSanjwhitPradavanSelaPhotVishJeweJoseMariGIUDJorgSelaSergAdagRobe
TheoWindNathASPLAndrWindNextZoneDorePlayJameRosehiddBirdZoneViraMuskBarbRondZoneGoinRahuZone
ZoneZonediamHaunRHTLZoneXVIIPearZoneGregZoneZoneOracZoneZoneZoneVeryOrenZoneXVIIJennEverLemo
ZoneIABRDepoSlimKronBekoElecFlinBookBookDeutBookPinaDigiGregAmbeMerrAdriRaymARAGLXXVPlanbagp
PLEXNDFEGuidFranMeliKidsWISEAlaiWindPhotAutoPhilLighSweePlanUtelXVIIPhotNighWalkFranNAUIDixi
JeweVisiXVIIXVIIGeraMichXVIIOscaJohnJeweBoriWhatAlonKMFDStudYevgWillMoveRUSSExceAnnaJewePete
WillThomMatzPlenEleaGeorLighTippJohnSoffJeweFuntNortRemikeysEnglFergfeatAdobForeIntrSlimSlim
SlimMariMIDIjQueWindBarbKnowHarrRodnJeffAlisBikiBusituchkasHowaFive


Top
 Profile  
 
PostPosted: Sun Nov 06, 2022 2:16 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
Mitt270.2CHAPCHAPMarkDuneWindWillAlmaDinoFripFareTescMoreFyodCathSweeJohaTrenClarSociDragUnit
MichWakeDisnGregStraEdouXVIIGilbHallDoctRebiNidrZaraCigaXVIIHonoStudArthPatrCataThisPeteAlai
OreaZoneLarrAlisLineEnigJoseTraiAdioMacbBaklHorsSweeArmiArchWillFinaWhitXVIIHerbSympMothTran
PushJuliXIIIAlanJameMatiNikiMighJohnPlanLogoWindNikiDownHarmCharStepRollRHINJeroLakaZoneArts
HostZoneSoftZoneZoneZoneFranASASZoneLogiZoneZoneZoneZoneZoneChriMiniZoneZoneGooNHellZoneZone
ZoneBronXVIIBioVpocyBoscStieRoyaBookFiftBabyCotoDaliPolaAcroJohnZENIPierPremWindWindAtlaFolk
ToweRIVETrefhearSmobHellEnhaWindWindmpegVintBoscChouCityDarlFantDeepLongFantDirelineRalpYour
ArthBillXVIIPhysContBriaXVIIOZONThisHeinXVIIMacrSantWindLiveOlegConcFredKennQuenScotModeJess
PatrJackSPINJeanQueeEmptAntoRobeWindWilhCureRespPankThomEleaPascPilkDeutWhatStanBirgBioVBioV
BioVAutoSabiEmilJewePascDaviCompAlliRoycJeweCaroISHQtuchkasBlueVisu


Top
 Profile  
 
PostPosted: Mon Dec 12, 2022 2:44 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
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


Top
 Profile  
 
PostPosted: Sun Feb 05, 2023 9:29 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 488746
clas418.5PERFBettJuliLoviLiveByroNichRajnChriMoneSnooPianDaviboldJohnEXPEJohnFligDalvMiloMary
WindWindLongwwwiWindMortTwisHojaAromCaudCleaEthnStepMineJeweBaroBoazMarrThomTefaSavaXVIIObse
ConsJeanacidWindVoguArktSonyMainLoveXIIIWindDaviRetrGeorTerrJuliMartarisCharCompSupeJeweElec
DeadGiocXVIIJohaJameNeutCircWindXVIISmarFrieWindEdwaZoneArtsSeptBarbPridArtsLopeQuesJohnArts
ArtsdiamArtsDamaZoneZoneDaviSkidZoneBeatZoneZoneZoneZoneZoneXVIIPremZoneZoneInteSatzPhilOliv
ZonePrinBerlSecuVillDigiMabeElecMotoThisBOOMBookTwinPianChicPridGiglHAMPMITSCITRTallCardPian
COCOKidsPeopDaviTrefDreaPatrWindwwwiCamoCosmDeLoKenwhappWhisWindRobePartLadyRSETNianLighINTE
FyodrnerMusiKracHansLatvyearEdwaFollJohnOnceJeffWeinJeweTougJewewwwpMarkHeliBreaStelViviBill
CrazXVIIFavoPokeXVIIFirsThouGAAPGranEdieOZONKamiSonaMichJacoFranFantJeweNeroEdwaPhotSecuSecu
SecufoamCAPOWherOpelRudyDisnRobeBrenMichSugaHanscapptuchkasRobeBrig


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group