为什么这个程序不会构建或运行? [英] why will this program not build or run?

查看:73
本文介绍了为什么这个程序不会构建或运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个简单的程序,无法构建或运行,任何想法

我做错了什么?


Private Sub btnCalculate_Click( ByVal sender As System.Object,ByVal e

As System.EventArgs)处理btnCalculate.Click

Dim c As Double = CDbl(txtOrderCost.Text)

Dim r As Integer = CInt(txtMonthlyDemand.Text)

Dim p As Double = CDbl(txtPartCost.Text)

Dim f As Double = 0.15

Dim h As Double = p * f

Dim eoq Double = 0


eoq =(p / r)* 0.15 * 332100


lblEOQ.Text =" EOQ =" &安培; eoq


End Sub

I''ve got this simple program that will not build or run, any idea
what I am doing wrong?

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnCalculate.Click
Dim c As Double = CDbl(txtOrderCost.Text)
Dim r As Integer = CInt(txtMonthlyDemand.Text)
Dim p As Double = CDbl(txtPartCost.Text)
Dim f As Double = 0.15
Dim h As Double = p * f
Dim eoq As Double = 0

eoq = (p / r) * 0.15 * 332100

lblEOQ.Text = "EOQ = " & eoq

End Sub

推荐答案

一个双倍的是整数&不是0.15


尝试使用''十进制'作为结果而不是''双''


示例:


Dim eoq As Decimal =(p / r)* 0.15 * 332100

lblEOQ.Text =" EOQ =" &安培; eoq


我没有尝试过您的代码,因为您从未给出任何可能的值

OrderCost,MonthlyDemand或PartCost


-

新手编码器

(这只是一个名字)
A double is expection whole numbers & not 0.15

try using ''Decimal'' as the result instead of ''Double''

Example:

Dim eoq As Decimal = (p / r) * 0.15 * 332100
lblEOQ.Text = "EOQ = " & eoq

I haven''t tried your code because you never gave any possible values for
OrderCost, MonthlyDemand or PartCost

--
Newbie Coder
(It''s just a name)


嗯,如果它不能编译(构建)那么肯定不会运行那么它不会运行的事实是不可能的。


你得到了什么编译时错误?

" Ron" < pt ***** @ yahoo.comWrote in message

news:11 ********************** @ v45g2000cwv。 googlegr oups.com ...
Well, if it won''t compile (build) then it certainly won''t run so the fact
that it won''t run is irrevalent.

What compile-time error(s) are you getting?
"Ron" <pt*****@yahoo.comwrote in message
news:11**********************@v45g2000cwv.googlegr oups.com...

我有这个简单的程序,无法构建或运行,任何想法

我是什么我做错了吗?


Private Sub btnCalculate_Click(ByVal sender As System.Object,ByVal e

As System.EventArgs)处理btnCalculate.Click

Dim c As Double = CDbl(txtOrderCost.Text)

Dim r As Integer = CInt(txtMonthlyDemand.Text)

Dim p As Double = CDbl(txtPartCost) .Text)

Dim f As Double = 0.15

Dim h As Double = p * f

Dim eoq Double = 0


eoq =(p / r)* 0.15 * 332100

lblEOQ.Text =" EOQ =" &安培; eoq


End Sub
I''ve got this simple program that will not build or run, any idea
what I am doing wrong?

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnCalculate.Click
Dim c As Double = CDbl(txtOrderCost.Text)
Dim r As Integer = CInt(txtMonthlyDemand.Text)
Dim p As Double = CDbl(txtPartCost.Text)
Dim f As Double = 0.15
Dim h As Double = p * f
Dim eoq As Double = 0

eoq = (p / r) * 0.15 * 332100

lblEOQ.Text = "EOQ = " & eoq

End Sub


好的,这就是我现在的代码,它仍然无法加载当我运行时,我的

形式。


Private Sub btnCalculate_Click(ByVal sender As System.Object,ByVal
$ b $ as As System。 EventArgs)处理btnCalculate.Click

Dim c As Double = CDbl(txtOrderCost.Text)

Dim r As Integer = CInt(txtMonthlyDemand.Text)

Dim p As Double = CDbl(txtPartCost.Text)

Dim f As Decimal = CDec(0.15)

Dim h As Double = p * f

Dim eoq As Decimal = CDec((p / r)* 0.15 * 332100)


''用于eoq,使用以下公式作为指南

''用正确的公式替换

''eoq = CDec((p / r)* 0.15 * 332100)


lblEOQ.Text = EOQ = &安培; eoq


End Sub

我输入的输入:

订单成本25.00

每月需求90000

部分成本18.75

多数民众赞成我想要使用的形式但是从来没有打开我的格式进入他们

in,我甚至没有到目前为止。


2月12日晚上8点04分,Newbie Coder < newbieco ... @ spammeplease.com>

写道:
OK here is what I have for the code now and it still will not load my
form when I run it.

Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnCalculate.Click
Dim c As Double = CDbl(txtOrderCost.Text)
Dim r As Integer = CInt(txtMonthlyDemand.Text)
Dim p As Double = CDbl(txtPartCost.Text)
Dim f As Decimal = CDec(0.15)
Dim h As Double = p * f
Dim eoq As Decimal = CDec((p / r) * 0.15 * 332100)

''for the eoq, use the below formula as a guide
''replace with correct formula
''eoq = CDec((p / r) * 0.15 * 332100)

lblEOQ.Text = "EOQ = " & eoq

End Sub
FOR THE INPUTS I AM USING :
order cost 25.00
Monthly demand 90000
Part cost 18.75
Thats what I want to use but the form never opens for me to enter them
in, I dont even get that far.

On Feb 12, 8:04 pm, "Newbie Coder" <newbieco...@spammeplease.com>
wrote:

双倍是预期整数&不是0.15


尝试使用''十进制'作为结果而不是''双''


示例:


Dim eoq As Decimal =(p / r)* 0.15 * 332100

lblEOQ.Text =" EOQ =" &安培; eoq


我没有尝试过您的代码,因为您从未给出任何可能的值

OrderCost,MonthlyDemand或PartCost


-

新手编码器

(这只是一个名字)
A double is expection whole numbers & not 0.15

try using ''Decimal'' as the result instead of ''Double''

Example:

Dim eoq As Decimal = (p / r) * 0.15 * 332100
lblEOQ.Text = "EOQ = " & eoq

I haven''t tried your code because you never gave any possible values for
OrderCost, MonthlyDemand or PartCost

--
Newbie Coder
(It''s just a name)



这篇关于为什么这个程序不会构建或运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆