Optional or default command arguments #4625
-
|
Hello, I wasn't able to find any information about this, but I'm curious if it is possible to have optional or default command arguments designated in the FPP. I'd like to be able to do something like this: Where the I'd also be fine with some way to designate a default value, something like this, maybe. This would be a functionality where GDS auto fills the defaulted value. Obviously I'm just making up syntax, but does anything like this exist for F Prime? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Arrays, structs and enums can have default values (see user guide), and the GDS does auto-populates them (we recently fixed a bug w.r.t. that though, so make sure you're using GDS v4.1.1a1 or higher). I think that's the closest we have to what you're describing. But that's not available for basic types AFAIK. Optionally serializing something sounds like trouble (although I'm sure it's possible). You could have the GDS form be optional and still serialize a default, but that's somewhat similar to just using a default value. |
Beta Was this translation helpful? Give feedback.
-
|
Excellent! Thank you. This is what I needed to know. Agreed about optional serialization being a problem. This makes sense. |
Beta Was this translation helpful? Give feedback.
Arrays, structs and enums can have default values (see user guide), and the GDS does auto-populates them (we recently fixed a bug w.r.t. that though, so make sure you're using GDS v4.1.1a1 or higher). I think that's the closest we have to what you're describing. But that's not available for basic types AFAIK.
Optionally serializing something sounds like trouble (although I'm sure it's possible). You could have the GDS form be optional and still serialize a default, but that's somewhat similar to just using a default value.