乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 11|回复: 0

无效的过程调用或参数

[复制链接]

1

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2007-10-31 21:03:00 | 显示全部楼层 |阅读模式
Sub cccc() '测试函数
'Private Type Point '三维点
   ' X As Single
   ' Y As Single
    'H As Single
'End Type
'Dim sqm() As Double
Dim line As AcadLine
Dim s(0 To 2) As Double
'Dim e(0 To 2) As Double
Dim s1() As Variant
Dim e1() As Variant
Dim x As Variant
Dim y As Variant
Dim h As Variant
Dim PI As Double
PI = 3.1415926
    Dim d As Double
    Dim t As Double
    Dim l As Double
    Dim r As Double
    Dim d1 As Double
    Dim e As Double
    Dim f As Double
    Dim m As Double
    Dim n2 As Double
    Dim n As Double
    Dim c1 As Double
    Dim c2 As Double
    Dim c3 As Double
    Dim c4 As Double
    Dim c5 As Double
    Dim c As Double
    Dim a As Double
    Dim b As Double
      
    Dim DD As Double
    Dim g As Double
    Dim m1 As Double
    Dim n1 As Double
    Dim w As Double
    Dim p As Double
    Dim q As Double
    'Dim sqm1 As Variant
    Dim sqm1(0 To 2) As Double
    Dim sqm(0 To 2) As Double
   
    x = 144.005: y = -14: h = 1076
    a = 29: b = 2
    c4 = (a - b) ^ (1 / 3)
    c5 = 1 / 3
      
  If h
      e = 6 - 0.40342 * d1 + 1.20744 * d1 ^ 2 / 10 ^ 3 + 2.78123 * d1 ^ 3 / 10 ^ 7
      
      f = 12 + 0.440058 * d1 - 1.16241 * d1 ^ 2 / 10 ^ 3 + 1.2662856 * d1 ^ 3 / 10 ^ 6
      
      m = -(r ^ 2 * x)
      
      n2 = e + r - y
      
      n = 2 * r * n2 / 3
      
       c1 = Sqr(m ^ 2 + n ^ 3)
      
      c2 = (c1 - m) ^ 1/3      
      c3 = (-c1 - m) ^ 1 / 3
      
      c = c2 + c3
            
           DD = e + (1 / 2) * c ^ 2 / r
      
         g = Atn(c / r) '* 180 / pi
      
      m1 = (0.5 * l * (Sqr(r ^ 2 + l ^ 2)) + 0.5 * r ^ 2 * Log(l + Sqr(r ^ 2 + l ^ 2)) - 0.5 * r ^ 2 * Log(r)) / r
      
      n1 = (0.5 * c * (Sqr(r ^ 2 + c ^ 2)) + 0.5 * r ^ 2 * Log(c + Sqr(r ^ 2 + c ^ 2)) - 0.5 * r ^ 2 * Log(r)) / r
      
      w = f + (t - f) * (n1 / m1) ^ 2.2
      
      p = c + 0.5 * w * Sin(g)
      
      q = DD - 0.5 * w * Cos(g)
      
      MsgBox c2
      
      MsgBox "x=" & p & " y= " & q
      
      
     End Sub
其中的C2值c2 = (c1 - m) ^ 1/3 提示没问题,但算出来是(c1 - m)/3的结果,若变成c2 = (c1 - m) ^ (1/3),老提示无效的过程调用或参数.              
在这里请教各位高手,先行感谢
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-7-5 17:30 , Processed in 0.648793 second(s), 55 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表