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

Add pub access modifier to publicly used struct fields #200

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions func/func.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pub type VectorValuedFn = fn (x f64, y []f64, params []f64) f64

// Definition of an arbitrary function with parameters
pub struct Fn {
pub:
f ArbitraryFn @[required]
mut:
params []f64
Expand Down Expand Up @@ -46,6 +47,7 @@ pub fn (f Fn) safe_eval(x f64) !f64 {

// Definition of an arbitrary function returning two values, r1, r2
pub struct FnFdf {
pub:
f ?ArbitraryFn
df ?DfFn
fdf ?FdfFn
Expand Down
3 changes: 3 additions & 0 deletions iter/ranges.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub:

@[params]
pub struct IntIterParams {
pub:
start i64
stop i64 @[required]
step i64 = 1
Expand Down Expand Up @@ -71,6 +72,7 @@ pub:

@[params]
pub struct FloatIterParams {
pub:
start f64
stop f64 @[required]
step f64 = 1.0
Expand Down Expand Up @@ -126,6 +128,7 @@ pub:

@[params]
pub struct LinearIterParams {
pub:
start f64 @[required]
stop f64 @[required]
len i64 = 50
Expand Down
1 change: 1 addition & 0 deletions plot/show.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import time
@[params]
pub struct PlotConfig {
net.ListenOptions
pub:
timeout time.Duration = 1 * time.second
use_cdn bool
saddr string = ':0'
Expand Down
1 change: 1 addition & 0 deletions roots/bisection.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub mut:
// BisectionParams contains the parameters for the bisection method
@[params]
pub struct BisectionParams {
pub:
xmin f64
xmax f64
epsrel f64 = 1e-6
Expand Down
1 change: 1 addition & 0 deletions util/util.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn arange(n int) []int {

@[params]
pub struct RangeStep {
pub:
step int = 1
}

Expand Down
Loading