乐筑天下

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

[编程交流] I have got the error of "; err

[复制链接]

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 18:52:17 | 显示全部楼层 |阅读模式
I copied this lsp from a online tutorial, but it does work on my computer.
It keep showing the error:
"; error: no function definition"
--------------------------------------------------------------------------------------------
Here is my lsp:
  1. (defun c:ift()(initget 1 "A B C")(setq grade (getkword "Please enter your grade (A/B/C):: "))(if (=grade "A")   (princ "You have receied marks greater than 75%."))(if (=grade "B")   (princ "You have receied marks greater than 65%."))(if (=grade "C")   (princ "You are failed."))  )
回复

使用道具 举报

rlx

21

主题

1505

帖子

1551

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
81
发表于 2022-7-5 19:23:52 | 显示全部楼层
=grade "A" must be with a space between = and grade , so (if (= grade "A")... , same for B & C
 
 
Gr. Rlx
回复

使用道具 举报

1

主题

2

帖子

1

银币

初来乍到

Rank: 1

铜币
5
发表于 2022-7-5 19:33:37 | 显示全部楼层
Thanks very much, it solved the problem!!
回复

使用道具 举报

4

主题

2143

帖子

2197

银币

限制会员

铜币
-24
发表于 2022-7-5 20:00:43 | 显示全部楼层
Please read the Code Posting Guidelines and place your Code in Code Tags.
 
[NOPARSE]
  1. your code goes here
[/NOPARSE]
 
  1. your code goes here
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-12 13:53 , Processed in 0.744586 second(s), 60 queries .

© 2020-2025 乐筑天下

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