使用IDL的12个小技巧.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
使用IDL的12个小技巧

原文来自michaelgallory译文有不妥之处请大家指正。 tip 1 put code in files. your choices are to write main-level programs, batch files, and normal procedures/functions. the bulk of your code should probably be in procedures and functions, but there are certainly reasons to use both main-level programs and batch files. main-level programs are handy for setting up a situation and allowing you to enter commands accessing the variables in the program after it has run. batch files are good for including code that needs to be typed in multiple locations. 把代码存放在文件中。你可以选择写主程序,批处理文件和常见的过程或函数。大量的代码应该是包含在过程和函数中,但是为什么要用主程序和批处理文件,这肯定是有它的原因的。主程序有利于环境的创建,在程序运行后你还可以输入命令来访问它的变量。批处理文件有利于存储那些需要在多个位置键入的代码。 tip 2 place your main routine last in a file and name the file the same as this routine plus a .pro extension. alternatively, you could put each routine in its own file with the same name as the routine plus a .pro extension. following this advice will save a big headache someday. when you manually compile your code, this tip doesnt matter. do this if you want idl to automatically find your code (and you will eventually, probably tomorrow). 把你的主程序放在文件的最后,并把此程序名作为文件名,以.pro为扩展名。或者你可以把每个程序单独放在一个文件里,以程序名作为文件名,以.pro为扩展名。这样做的好处是以后会给你省很多麻烦。当你手动编译你的代码时,这个方法是没什么用的。如果你想要idl自动找到你的代码时(你最终肯定要的,可能就是明天),就要用这个方法了。tip 3 be aware of short integers. the default integer in idl is a 16-bit (short) integer which has a range of -32,768 to 32,767. it is used in situations like: n = 5 where no specific type of integer is specified. if you want to change the default integer, put? compile_opt defint32 at the beginning of every routine where you want to change the behavior. or, always specify the type of integer you want, like n = 5l to create a long integer (32-bit). 注意短整型。idl中默认的整型是16位(“短”)整型,它的取值范围是-32,768到32,767。它用于下例情况下: n = 5? 这里没有指定整数的类型。如果你想要改变默认的整型,键入: compile_opt defint32 在每个你想改变状态的程序的开头,或总是指定你想要的整型类型,如: n = 5l 创建一个长整型(32位) tip 4 put compile_opt strictarr at the beginning of every routine you write. the explanatio

文档评论(0)

xcs88858 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档