简体   繁体   English

争论是错误的类型

[英]Argument is the Wrong Type

I am trying to make a pie graph by using drawarc and user inputted values, but after I calculate the angle, and try to draw the arc I get this error, "Argument is the Wrong Type" for item1Angle. 我试图通过使用drawarc和用户输入的值制作一个饼图,但是在计算角度并尝试绘制圆弧后,出现此错误,“ item1Angle的参数为错误类型”。 Any Help? 有帮助吗?

var item1 : int
var item2 : int
var item3 : int
var allItems : int
var item1Angle : real
var item2Angle : real
var item3Angle : real
%Ending Angle for First Sector = starting for second
put "Please Enter The First Item Cost"
get item1

put "Please Enter The Second Item Cost"
get item2

put "Please Enter The Third Item Cost"
get item3

allItems := item1 + item2 + item3

item1Angle := (360/allItems) * item1
item2Angle := (360/allItems) * item2
item3Angle := (360/allItems) * item3

drawfillarc (100,100,50,50, item1Angle, item2Angle)
drawfillarc (100,100,50,50, item2Angle, item3Angle)
drawfillarc (100,100,50,50, item3Angle, item1Angle)

弄清楚了,我不得不使用Round函数,如下所示:

item1Round := round (item1Angle)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 变量数据类型错误? - Wrong variable data type? 如何使用objective-c获取变量参数中的参数类型 - how to get the type of argument in variable argument using objective-c 无法将类型'UITextField'与预期的参数类型'String'配合使用 - Cannot concert type’UITextField’ to expected argument type ‘String’ 具有不同var类型的C#调用返回类型 - C# call return type with different type of var for argument 使用浮点常量和变量的“printf”的参数 1 的类型不兼容 - Incompatible type for argument 1 of 'printf' using float constants and variables 属性路径“password”中给出的“string”、“null”类型的预期参数 - Expected argument of type "string", "null" given at property path "password" 无法使用类型的参数列表(['NSObject'],forKey:String)调用updateValue - Cannot invoke updateValue with an argument list of type (['NSObject'], forKey: String) 错误:无法在f.WriteString的参数中使用cur(类型* user.User)作为类型字符串 - Go err: cannot use cur (type *user.User) as type string in argument to f.WriteString “返回参数类型字符串存储引用不能隐式转换为预期类型(第一个返回变量的类型)字符串调用数据”的解决方案? - Solution for "Return argument type string storage ref is not implicitly convertible to expected type (type of first return variable) string calldata"? 编译错误:尝试在函数调用中指定参数类型时出现“expected primary-expression before ' '” - Compilation error: "expected primary-expression before ' '" when trying to specify argument type in a function call
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM