sahb1239 / plc- Goto Github PK
View Code? Open in Web Editor NEWPLC++
License: Apache License 2.0
PLC++
License: Apache License 2.0
Giver fejl 2 steder i for-løkker
http://prntscr.com/71s41p
http://prntscr.com/71s4ct
Giver EmptyStack
Codegen er ikke rigtig
int func() {
if (true)
return 5;
}
Prøv med kode:
void init()
{
int i = 0;
}
void run()
{
int j = 1;
j = 15;
}
Dette giver ingen fejl
int func() {
int i = 5;
if (i)
return 4;
}
int func() {
int A[5];
A[9] = 4;
}
Bemærk at kun j nævnes - og kun én gang.
Giver ArrayIndexOfOutBounds
bool func()
{
int i = 5;
int j = 2;
bool b = i == j;
}
struct str { int i; int j; float k; }
int func()
{
struct str test;
test.i = 5;
return 0;
}
Sker ved
int func() {
int i = 5 % 2;
return i;
}
int func()
{
int i = 100;
i += 50;
return i;
}
Det skal vel være sådan at der er et return-statement, som ALTID kan nås
int func() {
if (false)
{
return 0;
}
else
{
// Haha, I never return anything
}
}
port func() {
int i = 99;
return (port)(timer)(port)(double)(bool)i;
}
bool func()
{
int i = 10;
int j = 6;
if (i > j)
{
int k = 5;
}
return b;
}
Giver fejl
int func()
{
int A[] = {1, 2, 3};
}
Problemer. Muligvis ifm. stack'en
cant assign to field in a struct. Parser exception. Missing';'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.