为什么Fortran中存在隐含的SAVE属性?(Why is there an implied SAVE attribute in Fortran? [duplicate])
这个问题在这里已经有了答案:
如果我在Fortran声明语句中初始化一个变量,那么该变量会隐式地接收一个SAVE属性,并且初始化表达式只会被执行一次。
例如,下面的程序
program test implicit none call foo() call foo() contains subroutine foo () integer :: i = 0 i = i + 1 write(*,*) i end subroutine foo end program test
将打印
1 2
由于这在许多其他语言中是不同的,我想知道为什么Fortran标准委员会选择了这种行为?
非常感谢! 麦克风
This question already has an answer here:
If I initialize a variable in a Fortran declaration statement, that variable implicitly receives a SAVE attribute and the initialization expression will only be executed once.
For example, the following program
program test implicit none call foo() call foo() contains subroutine foo () integer :: i = 0 i = i + 1 write(*,*) i end subroutine foo end program test
will print
1 2
Since this is different in many other languages I was wondering why the Fortran standard committee chose this behavior?
Thanks a lot! Mike
原文:https://stackoverflow.com/questions/14565739
最满意答案
不使用任何服务器端处理生成的文件本身不可能包含任何其他数据。
你有几个选择(如果我正确理解你的问题):
- 您可以重新配置服务器以将“.htm”作为ASPX页面处理并使用您的代码。
- 您可以使用重写规则将特定URL从Web服务器重定向到ASPX页面
A file that is not generated with any server-side processing cannot possibly include any additional data, per se.
You do have a few options (if I understand your problem correctly):
- You can reconfigure the server to process ".htm" as an ASPX page and use your code behind.
- You can redirect the specific URL to an ASPX page from the web server using rewrite rules
相关问答
更多-
您需要以不同的方式设置客户端模板,具体取决于您的应用程序部署的事实: if (/* some check to see if on production which is specific to your implementation */) { columns.Bound(f => f.TechnicalKey) .ClientTemplate("<# if (FileName != 'status.txt' && StatusText=='PROCESSED') { #>Download ...
-
这个线程帮助了我: https://connect.microsoft.com/VisualStudio/feedback/details/653444/visual-studio-sp1-or-specifically-vsto-sp1-issue-with-config-file-location 特别是,这解决了我的问题: 您需要在部署项目中进行更改,而不是在.vsto或.manifest文件中进行更改。 具体而言,您需要更改“Manifest”注册表值中写入的字符串。 例如,本文中的演练指导您将“M ...
-
System.Configuration.ConfigurationManager.Appsettings.Get("imglServer"); 试试看。 System.Configuration.ConfigurationManager.Appsettings.Get("imglServer"); Try that.
-
不使用任何服务器端处理生成的文件本身不可能包含任何其他数据。 你有几个选择(如果我正确理解你的问题): 您可以重新配置服务器以将“.htm”作为ASPX页面处理并使用您的代码。 您可以使用重写规则将特定URL从Web服务器重定向到ASPX页面 A file that is not generated with any server-side processing cannot possibly include any additional data, per se. You do have a few op ...
-
如果没有找到一个很好的解决方案,我选择了以下内容: 发布后,我运行一个执行以下操作的bat文件: 复制已发布的目录并使用今天的日期重命名 更新Web.Config appSetting值 使用7zip压缩更新的目录 将压缩目录上传到Google云端硬盘,以便我的支持团队可以将其提供给我们的用户。 你可以在这里看到我如何修改字符串: bat文件修改web.config设置 Short of finding a great solution for this, I have elected for the fo ...
-
网站应该是,而插槽是生产 。 Website should be thff and the slot is Production.
-
是从内存还是从web.config文件中读取AppSetting值?(Are AppSetting values read from memory or from the web.config file?)[2022-05-28]
而且,就像往常一样,几乎在我提出这个问题时,我的google-fu就开始了:/ MSDN将AppSettings方法列为 public static NameValueCollection AppSettings { get; } 但实际上没有提到线程安全。 但是, ConfigurationManager类的页面有一个关于线程安全的部分,其中说: 此类型的任何公共静态(在Visual Basic中为Shared)成员都是线程安全的。 任何实例成员都不保证是线程安全的。 所以看来我列出的机制是线程安全的。 ... -
作为转换, app.config文件始终存储在具有application_name.config名称的应用程序路径中。 如果要将配置存储在自定义路径中,请考虑使用单独的XML文件绕过app.config文件。 以下是示例代码: internal sealed class AppSettingsSerializer { private AppSettingsSerializer() { } static int BufferSize { get { return 4096; } } ...
-
这种方法对我有用(不太可读:) This approach worked for me (not very readable :)...您是否尝试过查看ConfigurationSection? 你可能想在msdn中查看这篇文章。 使用ConfigurationSection创建自定义配置节点http://msdn.microsoft.com/en-us/library/2tw134k3(v=vs.100).aspx Have you tried looking at ConfigurationSection? you may want to check this article in msdn. Create Custom Configu ...
相关文章
更多- rails save问题数据库表主键必须是id吗?
- 有些困惑,大家帮忙看看一对多映射时save的一个问题,多谢了!!!
- Cannot expose request attribute 'website' because of an existing model object of the same name 的解决方案
- CISCO ROUTER 中的隐含命令
- java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute 的解决方案
- struts2.xml中crud!input什么意思
- jquery 怎么得到link中text的属性
- RelativeLayout代码中设置属性
- XML中 属性与元素的用法
- 利用SOLR搭建企业搜索平台 之八(solr 实现去掉重复的搜索结果,打SOLR-236_collapsing.patch补丁)
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)