Is the op-amp being used as a comparator, or as an amplifier, or
something else entirely?
It's being used as a linear amplifier I reckon and if you showed more of the circuit I think you'd find that the top of R5 goes to a positive power (or reference) rail. That positive power rail will dictate what the negative output voltage will be from the LM337.
Regulation occurs when the op-amp's inputs are equal and, because pin 3 is tied to 0V, when pin 2 attains 0V, the LM337 will be regulating.
So if the voltage at the top of R5 is +3.7 volts (pick any number really), the LM337 will output -3.7 volts.
You have fallen into a classic XY problem1 trap. However, thanks for briefly mentioning the original issue, as that makes the overall situation easier to understand.
You have a genuine problem ("X"):
things are not working with the distance sensors.
That is not enough detail to help you with the actual problem, but I'll come back to that. You are having problems interpreting the results from an (unfortunately inappropriate) multimeter test, and that is what you were asking about ("Y").
However "Y" is the wrong issue on which to be spending your time, because getting an answer to that, won't help you with solving the original problem "X". As confirmation, below is the answer to your question "Y" (about the apparent shorts you measured) but it doesn't help resolve the real problem "X" (about the sensors, when powered by the DE0-Nano):
I'm using a multimeter to try and check what the problem is, and when I tried to check for shorts (with a mode called continuity, I think), one of the following may happen [...]
Using a typical multimeter in that way on a board with ICs, will usually lead to lots of false positive apparent shorts displayed on the meter. This is due to the ESD protection diodes (and other ESD protection structures) inside most ICs, which can conduct during that "continuity" testing.
So stop doing down this rabbit hole and back-up a few steps :-) Here is what I suggest:
Go back to your earlier configuration which you say worked i.e. external separate power supply for the 3.3V and 5V sections. I hope (and expect) this will work again. This would confirm your hardware has no "short circuits".
I suspect that either additional output capacitance and/or a higher current capability of that separate DC power supply (compared to the DE0-Nano's power output), is why that configuration worked - see next point.
Note that some Sharp distance sensors have unusual power requirements. Specifically they pulse their IR LEDs at relatively high currents, for brief periods. Due to those high currents, they are well-known for needing lots of decoupling capacitance close to the sensors, especially if the power supply is weak, or has lots of inductance (e.g. long / thin wires etc.). Your sensor's datasheet mentions average supply current (12mA to 22mA) but not a maximum current!
Therefore use an oscilloscope at the sensor's power pin to view the waveform, and you may find it drops below the minimum acceptable power voltage for the sensor (e.g. in brief dips, when the internal IR LED is pulsed) due to the factors I mentioned above. I expect decoupling capacitors will be required as a minimum. That may be part or all of the reason why "things are not working with the distance sensors" when they are powered from the DE0-Nano.
If you are still having problems with the sensors only when they are powered from the DE0-Nano, then focus on that and ask for more troubleshooting help. Show some photos of your setup, explain any constraints, use short power wires, expect to be asked to provide scope screen captures, and you will likely also need to provide info on the DE0-Nano and what power it can supply.
See these pages for examples of info about those Sharp sensors and the need for additional power supply decoupling near the sensor; some suggest also adding a low-pass filter on the output signal itself, although I doubt that output signal ripple is your current problem:
How to improve Sharp GP2Dxxx sensors
Testing GP2D12 Sensor: Oscilloscope Traces, Capacitors, and Distance Sensor Results
Sharp distance sensors
and some other relevant Electrical Engineering Stack Exchange questions:
Can't get consistent readings from Sharp IR range detector
Where to put stabilising capacitor?
Daisy chain (parallel) of IR sensors
Sharp Infrared sensor-Filtering supply ripple
Where to place a capacitor to smoothen IR sensor reading?
How do I properly use Sharp GP2Y0A21YK0F sensor?
Can't get consistent readings from Sharp IR range detector
Sharp IR distance sensor outputting consistently high voltage
1 There are several slightly different definitions of the XY problem so I linked to a Google search above, for readers who want to learn more. The terminology I use is:
"X [is] the underlying problem and Y the exposed question or request"
which is adapted from here.
Best Answer
Since there is hysteresis, we must analyze the behavior in a specific direction. If you provide the values and specify the comparator, I can update the description (if needed).
Both comparators will output the the highest possible voltage (pull-ups). The feedbacks will be open due to the diodes, and the thresholds will depend only on R8, R9 and R10, if the input current can be disregarded.
The comparator below will saturate its output, its feedback diode will conduct and both thresholds will be reduced.
The comparator above will saturate its output, its feedback diode will conduct and the thresholds will be reduced again.
The feedback networks will only be conducting when the comparators are saturated (low voltage output). When both Out1 and Out2 are high, the thresholds will depend only on R8, R9 and R10.