I'm wondering if there is a way to pass an array of values to a Procedure without defining an array variable.. For example, if I have a Procedure: Procedure DoSomething(X :Byte); Then I can call it with a specific a variable like this: Var ThingA :Byte; . DoSomething(ThingA); And I can also call it without a variable but instead just hard code a specific value like this: DoSomething($1A); So if I have a procedure like this: Procedure DoSomethingElse(Y :Array of Byte); I can call it like this: Var ThingB :Array Of Byte; SetLength(ThingB,3); ThingB[0] :=$12; ThingB[1] :=$1A; ThingB[2] :=$2B; DoSomethingElse(ThingB); But can I also just call it with specific values somehow? DoSomethingElse([$12,$1A,$2B]); for example. of course this doesn't work, but is there a syntax that would work? James
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal