Most functions in PCC that operate on numbers do not care whether the numbers are integral or fractional; those are documented as taking a Num. However, some operations are only sensible on integers. Those are documented as taking type Int, and will refuse to work with fractional numbers. Bools automatically convert to integers, where True converts to 1, False to 0.
If you have a fractional number, you can use Int or Round to convert it to an integer.
In general, the result of an operation involving fractional numbers is again a fractional number, whereas the result of an operation involving integers can be an integer if possible.
PCC 1.x and PCC2 track a value's type very closely, thus 2.5*2 is a fractional number because it started out with one. PCC2 Web relaxes these rules a little, and looks at the actual values. In PCC2 Web, 2.5*2 is a valid integer.
Commands and Functions taking Int as Parameter
- AddItem
- AtomStr
- AuthPlayer
- Beam
- BitAnd
- BitNot
- BitOr
- BitXor
- BuildBaseDefense
- BuildBaseDefenseWait
- BuildBeams
- BuildDefense
- BuildDefenseWait
- BuildEngines
- BuildFactories
- BuildFactoriesWait
- BuildFighters
- BuildHulls
- BuildLaunchers
- BuildMines
- BuildMinesWait
- BuildShip
- BuildTorps
- CargoTransfer
- CargoTransferWait
- CDiv
- Cfg
- ChangeFleetLeader
- Chr
- Chr$
- CMul
- Dim
- Distance
- Engine
- EnqueueShip
- FindShipCloningAt
- FixShip
- FixShipWait
- Get
- GetByte
- GetLockInfo
- GetLong
- GetStr
- GetWord
- Hull
- InMsg
- Launcher
- Left
- Mid
- Minefield
- MoveTo
- MoveTowards
- NewCircle
- NewLine
- NewLineRaw
- NewMarker
- NewRectangle
- NewRectangleRaw
- Notify
- Planet
- PlanetAt
- PlanetName
- Player
- Put
- Random
- RecycleShip
- RecycleShipWait
- Right
- RMid
- Seek
- SellSupplies
- SetByte
- SetColonistTax
- SetColor
- SetEnemy
- SetFleet
- SetLong
- SetMission
- SetMission (Planet Command)
- SetMission (Ship Command)
- SetNativeTax
- SetSpeed
- SetStr
- SetTech
- SetWaypoint
- SetWord
- Ship
- ShipName
- ShipNameAndId
- Storm
- Str
- String
- String$
- Torpedo
- Truehull
- Ufo
- UI.ChooseObject
- UI.GotoChart
- UI.GotoScreen
- UI.Input
- UI.InputNumber
- UI.ListFleets
- UI.ListShipPrediction
- UI.ListShips
- UI.PlanetInfo
- Vcr
Functions returning Int
- Asc
- Atom
- BitAnd
- BitNot
- BitOr
- BitXor
- CExtract
- Count
- CountPlanets
- CountShips
- Dim
- FindPlanet
- FindShip
- FindShipCloningAt
- FPos
- FreeFile
- FSize
- GetByte
- GetLong
- GetWord
- Int
- IsArray
- Key
- Len
- PlanetAt
- Random
- RLen
- Round
- Truehull
Properties of type Int
- Aux$
- Aux.Ammo
- Aux.Count
- Bases
- Beam$
- Beam.Count
- Beam.Max
- Build.Beam$
- Build.Beam.Count
- Build.Engine$
- Build.Hull$
- Build.QPos
- Build.Remainder
- Build.Torp$
- Build.Torp.Count
- Capabilities
- Cargo.Colonists
- Cargo.D
- Cargo.Free
- Cargo.M
- Cargo.Max
- Cargo.MaxFuel
- Cargo.Money
- Cargo.N
- Cargo.Supplies
- Cargo.T
- Chart.X
- Chart.Y
- Class
- Colonists
- Colonists.Change$
- Colonists.Happy$
- Colonists.Supported
- Colonists.Tax
- Colonists.Tax.Income
- Color
- Color.EGA
- Config.BeamChargeRate
- Config.BeamKillRate
- Config.CrewDefenseRate
- Config.TorpChargeRate
- Config.TorpMissRate
- Cost.D
- Cost.M
- Cost.MC
- Cost.T
- Crew
- Crew$
- Crew.Normal
- Damage
- Defense
- Defense.Base
- Defense.Base.Max
- Defense.Base.Want
- Defense.Max
- Defense.Want
- Density.D
- Density.M
- Density.N
- Density.T
- End.X
- End.Y
- Enemy$
- Engine$
- Engine.Count
- Expire
- Factories
- Factories.Max
- Factories.Want
- Fighter.Bays
- Fighter.Bays (Hull Property)
- Fighter.Bays (Ship Property, Combat Participant Property)
- Fighter.Count
- Fighters
- Fighters.Max
- Fleet$
- FuelFactor
- Ground.D
- Ground.M
- Ground.N
- Ground.T
- Heading$
- Hull$
- Id
- Id2
- Image
- Image$
- Index
- Industry$
- Kill
- LastScan
- Left
- Left.Aux$
- Left.Aux.Ammo
- Left.Aux.Count
- Left.Beam$
- Left.Beam.Count
- Left.Crew
- Left.Crew$
- Left.Damage
- Left.Fighter.Bays
- Left.Fighter.Count
- Left.Hull$
- Left.Id
- Left.Image
- Left.Level
- Left.Mass
- Left.Name
- Left.Owner$
- Left.Shield
- Left.Status$
- Left.Torp$
- Left.Torp.Count
- Left.Torp.LCount
- Level
- Lines
- Loc.X
- Loc.Y
- Magic
- Mass
- Mined.D
- Mined.M
- Mined.N
- Mined.T
- Mines
- Mines.Max
- Mines.Want
- Mission$
- Mission.Intercept
- Mission.Tow
- Money
- Move.DX
- Move.DY
- Move.ETA
- Move.Fuel
- My.Bases
- My.InMsgs
- My.OutMsgs
- My.PBPs
- My.Planets
- My.Race$
- My.Race.Id
- My.Race.Mission
- My.Score
- My.Score.Freighters
- My.Ships
- My.Ships.Capital
- My.Team
- My.VCRs
- Name
- Name.Full
- Natives
- Natives.Change$
- Natives.Gov$
- Natives.Happy$
- Natives.Race$
- Natives.Tax
- Natives.Tax.Base
- Natives.Tax.Income
- Natives.Tax.Max
- NumUnits
- Orbit
- Orbit$
- Orbit.Enemy
- Orbit.Own
- Owner$
- Owner.Real
- PBPs
- Planets
- Race$
- Race.Id
- Race.Mission
- Radius
- Right
- Right.Aux$
- Right.Aux.Ammo
- Right.Aux.Count
- Right.Beam$
- Right.Beam.Count
- Right.Crew
- Right.Crew$
- Right.Damage
- Right.Fighter.Bays
- Right.Fighter.Count
- Right.Hull$
- Right.Id
- Right.Image
- Right.Level
- Right.Mass
- Right.Name
- Right.Owner$
- Right.Shield
- Right.Status$
- Right.Torp$
- Right.Torp.Count
- Right.Torp.LCount
- Scanned
- Score
- Score.Freighters
- Seed
- Selection.Layer
- Shape
- Shield
- Ships
- Ships.Capital
- Ships.Freighters
- Ships.Total
- Shipyard.Id
- Size
- Speed$
- Status$
- Storage.Ammo
- Storage.Beams
- Storage.Engines
- Storage.Hulls
- Storage.Launchers
- Supplies
- System.Host$
- System.HostVersion
- System.RandomSeed
- System.Version$
- Tag
- Team
- Tech
- Tech.Beam
- Tech.Engine
- Tech.Engine (Planet Property)
- Tech.Engine (Engine Property)
- Tech.Hull
- Tech.Torpedo
- Tech.Torpedo (Planet Property)
- Tech.Torpedo (Torpedo Property)
- Temp
- Temp$
- Torp$
- Torp.Count
- Torp.LCount
- Torp.LMax
- Total.Capital
- Transfer.Ship.Colonists
- Transfer.Ship.D
- Transfer.Ship.Id
- Transfer.Ship.M
- Transfer.Ship.N
- Transfer.Ship.Supplies
- Transfer.Ship.T
- Transfer.Unload.Colonists
- Transfer.Unload.D
- Transfer.Unload.Id
- Transfer.Unload.M
- Transfer.Unload.N
- Transfer.Unload.Name
- Transfer.Unload.Supplies
- Transfer.Unload.T
- Turn
- Type
- Type$
- UI.Prefix
- UI.Screen
- UI.X
- UI.Y
- Units
- Visible.Planet
- Visible.Ship
- Voltage
- Waypoint.DX
- Waypoint.DY
- Waypoint.Planet
- Waypoint.X
- Waypoint.Y