a / b: Difference between revisions
Jump to navigation
Jump to search
m (moved to template) |
Lou Montana (talk | contribs) m (Fix) |
||
(61 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |sortKey= # | ||
|1.00 | |game1= ofp | ||
|version1= 1.00 | |||
| | |game2= ofpe | ||
|version2= 1.00 | |||
| | |game3= arma1 | ||
|version3= 1.00 | |||
| | |game4= arma2 | ||
|version4= 1.00 | |||
| | |game5= arma2oa | ||
|version5= 1.50 | |||
| | |game6= tkoh | ||
|version6= 1.00 | |||
| | |||
|game7= arma3 | |||
|version7= 0.50 | |||
|gr1= Math | |||
|gr2= Config | |||
|descr= Returns the quotient of two numbers. If the divisor is 0 a ''Division by zero'' error is shown but the script does not stop and the result of such division is assumed to be 0.<br><br> | |||
Alternative syntax returns the [[Config]] entry with the given name (alias for [[config greater greater name|>>]], slightly slower but with [[Operators#Order of Precedence|higher precedence]]). | |||
|s1= a [[a / b|/]] b | |||
|p1= a: [[Number]] - dividend | |||
|p2= b: [[Number]] - divisor | |||
|r1= [[Number]] - quotient | |||
|s2= config [[a / b|/]] name | |||
|s2since= arma1 1.00 | |||
|p21= config: [[Config]] | |||
|p22= name: [[String]] | |||
|r21= [[Config]] - config entry | |||
< | |x1= <sqf>_result = 15 / 3; // result is 5</sqf> | ||
|x2= <sqf>_cfgVehicles = configFile / "CfgVehicles"; // identical to configFile >> "CfgVehicles" (but the order of precedence)</sqf> | |||
|seealso= [[Operators]] [[configFile]] [[missionConfigFile]] [[campaignConfigFile]] [[configName]] [[config greater greater name|config >> name]] [[count]] | |||
}} | |||
[[ | {{Note | ||
[[ | |user= ffur2007slx2_5 | ||
[[ | |timestamp= 20140401000200 | ||
[ | |text= ({{arma3}} 1.14) config / name can be composed to config >> name [[String]] or [[Array]] format via [[BIS_fnc_configPath]]. E.g. | ||
[[ | <sqf> | ||
[configFile / "ATMineCrater" / "MissileCircleDust", ""] call BIS_fnc_configPath; // return: "configfile >> "ATMineCrater" >> "MissileCircleDust"" | |||
[configFile / "ATMineCrater" / "MissileCircleDust", []] call BIS_fnc_configPath; // return: ["configfile","ATMineCrater","MissileCircleDust"] | |||
</sqf> | |||
}} |
Latest revision as of 23:53, 29 April 2024
Description
- Description:
- Returns the quotient of two numbers. If the divisor is 0 a Division by zero error is shown but the script does not stop and the result of such division is assumed to be 0.
Alternative syntax returns the Config entry with the given name (alias for >>, slightly slower but with higher precedence). - Groups:
- MathConfig
Syntax
Alternative Syntax
Examples
- Example 1:
- Example 2:
- _cfgVehicles = configFile / "CfgVehicles"; // identical to configFile >> "CfgVehicles" (but the order of precedence)
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
- Posted on Apr 01, 2014 - 00:02 (UTC)
-
(Arma 3 1.14) config / name can be composed to config >> name String or Array format via BIS_fnc_configPath. E.g.
[configFile / "ATMineCrater" / "MissileCircleDust", ""] call BIS_fnc_configPath; // return: "configfile >> "ATMineCrater" >> "MissileCircleDust"" [configFile / "ATMineCrater" / "MissileCircleDust", []] call BIS_fnc_configPath; // return: ["configfile","ATMineCrater","MissileCircleDust"]
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Operation Flashpoint: Elite: Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Math
- Command Group: Config