语法:“width”的多个类型声明

时间:2017-08-11 12:35:46

标签: julia

我正在使用julia 0.6,我的代码用于在0.5.2上运行就好了,现在我移植它我得到了这个错误

span span

现在当我在整个包装上syntax: multiple type declarations for "width"时,我得到了这个结果

grep -rn "width" *

我只看到一个声明和宽度定义。所有这些代码都在构造函数中。第11行是构造函数体的第一行。我只是失明并在某处写了coolFile.jl:11: local const width::Int64 = Int64(sqrt(modulation)) coolFile.jl:12: local const mapSize::Tuple{Int64, Int64} = (width, width) coolFile.jl:19: local const minValue::Float64 = minimumDistance / 2 - minimumDistance * width / 2 coolFile.jl:20: for y in 1:width coolFile.jl:22: for x in 1:width coolFile.jl:44: for i in 1:2:width coolFile.jl:45: local const startIndex = 1 + width*i coolFile.jl:46: inplaceReverse(startIndex:(startIndex + width - 1)) 吗?

1 个答案:

答案 0 :(得分:0)

显然,我所有变量上的<!DOCTYPE html> <html> <head> @using System.Security.Principal @using CalcPayment_WebApp.Models.ViewModels @using CalcPayment_WebApp.Models.DataBase @using System.Linq <meta charset="UTF-8"> <meta name="google" content="notranslate"> <meta http-equiv="Content-Language" content="en"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>@ViewBag.Title - Some Company</title> <link rel="stylesheet" type="text/css" href="~/Content/StyleSheet.css"> @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/modernizr") </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> @{ WindowsIdentity identity = HttpContext.Current.Request.LogonUserIdentity; CheckIdentity(identity); if (Session["isSysAdmin"] == null || (bool)Session["isSysAdmin"] != true) { //show stuff } } @Html.ActionLink("Some Company", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" }) </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> @{ if (Session["isSysAdmin"] != null && (bool) Session["isSysAdmin"] == true) { <li>@Html.ActionLink("Customers", "Index", "Customers")</li> <li>@Html.ActionLink("Contact", "Contact", "Home")</li> } else { <li>@Html.ActionLink("Some Company", "Details", "Customers", new { id = Session["UserCID"] }, null)</li> <li>@Html.ActionLink("Contact", "Contact", "Home")</li> } } </ul> </div> </div> </div> <div class="container body-content"> @RenderBody() <hr /> <footer> <p>&copy; @DateTime.Now.Year - Some Company</p> </footer> </div> @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/bootstrap") @RenderSection("scripts", required: false) <!--Found at https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_sort_table Used for sorting tables--> <script> function sortTable(column,targetTable) { var table, rows, switching, i, x, y, shouldSwitch; table = document.getElementById(targetTable); switching = true; /*Make a loop that will continue until no switching has been done:*/ while (switching) { //start by saying: no switching is done: switching = false; rows = table.getElementsByTagName("TR"); /*Loop through all table rows (except the first, which contains table headers):*/ for (i = 1; i < (rows.length - 1); i++) { //start by saying there should be no switching: shouldSwitch = false; /*Get the two elements you want to compare, one from current row and one from the next:*/ x = rows[i].getElementsByTagName("TD")[column]; y = rows[i + 1].getElementsByTagName("TD")[column]; //check if the two rows should switch place: if (x.innerHTML.toLowerCase() > y.innerHTML.toLowerCase()) { //if so, mark as a switch and break the loop: shouldSwitch = true; break; } } if (shouldSwitch) { /*If a switch has been marked, make the switch and mark that a switch has been done:*/ rows[i].parentNode.insertBefore(rows[i + 1], rows[i]); switching = true; } } } </script> @functions { public void CheckIdentity(WindowsIdentity identity) { //Check user identity } } </body> </html> 都会导致问题。我不知道为什么,但删除一个说明符(无关紧要)导致错误及其无用的错误消息消失。

在0.6的发行说明中也没有提及任何内容。

因为有人低估了我(好工作!,低估了解决方案)。这是一个自包含的例子。

删除local conststruct Shit a::Int64 function Shit(b::Int64) local const c::Int64 = b * 3 new(c) end end ERROR: LoadError: syntax: multiple type declarations for "c" Stacktrace: [1] include_from_node1(::String) at .\loading.jl:569 [2] include(::String) at .\sysimg.jl:14 [3] process_options(::Base.JLOptions) at .\client.jl:305 [4] _start() at .\client.jl:371 while loading ~\shit.jl, in expression starting on line 1 或类型local会导致代码再次运行。