Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcut for discovering of conditions and their results #8

Closed
tpiekarski opened this issue Apr 26, 2020 · 1 comment
Closed

Shortcut for discovering of conditions and their results #8

tpiekarski opened this issue Apr 26, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@tpiekarski
Copy link
Owner

Brief Description
Add a macro for shortcut output of conditions and their result.

Additional context
none

@tpiekarski tpiekarski added the enhancement New feature or request label Apr 26, 2020
@tpiekarski tpiekarski self-assigned this Apr 26, 2020
@tpiekarski
Copy link
Owner Author

A possible shortcut could look like that and could be used inside an condition to examine if it's true or not.

if (x == 42) {
  ptrue("x == 42");
} else {
  pfalse("x == 42");
}

Output if the condition was met.

[ 12.300010] pp_demo_module: Condition "x == 42" was true

Output if the condition was not met.

[ 12.300010] pp_demo_module: Condition "x == 42" was false

The value of such a shortcut is disputable. There won't be a way to get hold of the condition to avoid having to repeat it in ptrue/pfalse.

@tpiekarski tpiekarski changed the title Shortcut output of conditions and their result Shortcut for discovering of conditions and their result May 19, 2020
@tpiekarski tpiekarski changed the title Shortcut for discovering of conditions and their result Shortcut for discovering of conditions and their results May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant