乐筑天下

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

[编程交流] Lee, Ask for advice.

[复制链接]

40

主题

177

帖子

100

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
248
发表于 2022-7-5 23:52:43 | 显示全部楼层
 
Hi BIGAL
 
The code in post#9  how to modify ?
回复

使用道具 举报

106

主题

1万

帖子

101

银币

顶梁支柱

Rank: 50Rank: 50

铜币
1299
发表于 2022-7-6 00:00:28 | 显示全部楼层
You take the original code and put it to one side to use with any program, this is normal practice of writing programs that contain multiple sub routines that are used over and over. I was involved in a big project we had multiple little routines that were used all the time and as I say where preloaded redy to use.
 
If you go the the Lisp forum nearly every posted code has a DEFUN this is a mini bit of code. Will post example.
回复

使用道具 举报

40

主题

177

帖子

100

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
248
发表于 2022-7-6 00:03:37 | 显示全部楼层
Hi, Tharwat,  your code
  1. (defun *error* (msg)   (redraw)   (if cl     (setvar 'clayer cl)   )   (if (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")     (princ msg)     (princ (strcat "\n** Error: " msg " **"))   ) )
 
when error, I want Restore the "textstyle" ,   do it like this ?  ok???
 
  1. (defun c:xxx(/ *error* cl [color="red"]ts[/color] )
 
  1. (defun *error* (msg)   (redraw)   (if cl     (setvar 'clayer cl)   )   [color="red"](if ts     (setvar 'TEXTSTYLE ts)   )[/color]   (if (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")     (princ msg)     (princ (strcat "\n** Error: " msg " **"))   ) )
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

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

GMT+8, 2025-3-11 03:28 , Processed in 0.630388 second(s), 56 queries .

© 2020-2025 乐筑天下

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