Uniform blocks and offsets

Question: when querying a uniforms in a block (shared layout), is the offset of each uniform always in the order they are declared in the shader, or is this not guaranteed?
Hope that makes sense. Been learning GL for a while, first time poster.

[QUOTE=wizardbox;1271767]Question: when querying a uniforms in a block (shared layout), is the offset of each uniform always in the order they are declared in the shader, or is this not guaranteed?
Hope that makes sense. Been learning GL for a while, first time poster.[/QUOTE]

The shared layout guarantees nothing about the layout except that, if you define a uniform block with the same members in the same order (including their names), then the two blocks will have identical layouts. If you need a more consistent layout, use std140.