Comments (4)
It probably shouldn't accept the syntax and have the same behaviour as Go, there's no good reason why the feature should be accepted in Gno. However, I think it's safe to say that if the only statement accepted in this context _
this can be considered low-priority :)
from gno.
This test reproduces the case where the loop's initialization condition is underscored, as shown below:
func TestForLoopIgnoredInital(t *testing.T) {
m := NewMachine("test", nil)
main := FuncD("main", nil, nil, Ss(
A("i", ":=", "0"),
For(
X("_"),
X("i < 5"),
Inc("i"),
),
))
m.RunDeclaration(main)
m.RunMain()
}
However, I'm not sure how to test for an empty value in the initial condition.
from gno.
@thehowl I didn't think there was anything wrong with it, but it was vague. Thanks for the feedback
from gno.
still an issue we should fix (I think more likely by not accepting all expressions as statements)
from gno.
Related Issues (20)
- [chain] Add JSON output support for `gnoland secrets get` HOT 3
- [gnokey] Display transaction hash to user after a `maketx` call HOT 1
- [gnoland] Improve UX of `genesis txs remove` command HOT 2
- A revert function to refund coins sent to a realm that doesn't take coins HOT 1
- importing "std" not working in gno.playground HOT 2
- Network peering discovery - Seed mode - Addrbook.json HOT 3
- Missing return value error in Poll tutorial HOT 2
- [gnokey] `Verify` and `Sign` functions now are not a pair HOT 2
- Proposal: Zero-Knowledge Proofs (ZKPs) for Login Process - Adena
- [Discussion] `std.ZeroAddress` HOT 5
- chore(docs): TODO removal
- amino.WithTypes accepts types being given the same name
- Public key format mismatch between `gnoland secrets init` and `gnoland genesis validator add` HOT 6
- [GnoVM]: Do not allow realms to store references to objects owned by other realms
- RFC(philosophy): Limiting depth of commands and subcommands in CLIs HOT 1
- RFC(philosophy): Merge some standalone repos into this monorepo
- [Discussion/Request] Add a way to catch emitted events in `gno test` HOT 1
- `Time.Now()` always return initial UNIX time HOT 2
- [gnokey] Make `gnokey query` more convenient HOT 3
- main README should disambiguate with gnosis project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gno.