Нужен сайт с описанием функций - C (СИ)
Формулировка задачи:
Никак не могу найти нормальный сайт с описанием функций-аргументы функции, выводимые значения функции и кратко что делает.
И второй вопрос из Керниган Ритчи. Предпоследняя строчка. Что за передаваемые данные
Решение задачи: «Нужен сайт с описанием функций»
textual
Листинг программы
/// <summary> /// Obtains the next character or function key pressed by the user. The pressed key is optionally displayed in the console window. /// </summary> /// /// <returns> /// A <see cref="T:System.ConsoleKeyInfo"/> object that describes the <see cref="T:System.ConsoleKey"/> constant and Unicode character, if any, that correspond to the pressed console key. The <see cref="T:System.ConsoleKeyInfo"/> object also describes, in a bitwise combination of <see cref="T:System.ConsoleModifiers"/> values, whether one or more SHIFT, ALT, or CTRL modifier keys was pressed simultaneously with the console key. /// </returns> /// <param name="intercept">Determines whether to display the pressed key in the console window. true to not display the pressed key; otherwise, false. </param><exception cref="T:System.InvalidOperationException">The <see cref="P:System.Console.In"/> property is redirected from some stream other than the console.</exception><filterpriority>1</filterpriority> [SecuritySafeCritical] [HostProtection(SecurityAction.LinkDemand, UI = true)] public static ConsoleKeyInfo ReadKey(bool intercept) { int numEventsRead = -1; Win32Native.InputRecord buffer; lock (Console.ReadKeySyncObject) { if ((int) Console._cachedInputRecord.eventType == 1) { buffer = Console._cachedInputRecord; if ((int) Console._cachedInputRecord.keyEvent.repeatCount == 0) Console._cachedInputRecord.eventType = (short) -1; else --Console._cachedInputRecord.keyEvent.repeatCount; } else { while (Win32Native.ReadConsoleInput(Console.ConsoleInputHandle, out buffer, 1, out numEventsRead) && numEventsRead != 0) { short local_3 = buffer.keyEvent.virtualKeyCode; if ((Console.IsKeyDownEvent(buffer) || (int) local_3 == 18) && ((int) buffer.keyEvent.uChar != 0 || !Console.IsModKey(buffer))) { ConsoleKey local_5 = (ConsoleKey) local_3; if (!Console.IsAltKeyDown(buffer) || (local_5 < ConsoleKey.NumPad0 || local_5 > ConsoleKey.NumPad9) && (local_5 != ConsoleKey.Clear && local_5 != ConsoleKey.Insert) && (local_5 < ConsoleKey.PageUp || local_5 > ConsoleKey.DownArrow)) { if ((int) buffer.keyEvent.repeatCount > 1) { --buffer.keyEvent.repeatCount; Console._cachedInputRecord = buffer; goto label_14; } else goto label_14; } } } throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_ConsoleReadKeyOnFile")); } } label_14: Console.ControlKeyState controlKeyState = (Console.ControlKeyState) buffer.keyEvent.controlKeyState; bool shift = (controlKeyState & Console.ControlKeyState.ShiftPressed) != (Console.ControlKeyState) 0; bool alt = (controlKeyState & (Console.ControlKeyState.RightAltPressed | Console.ControlKeyState.LeftAltPressed)) != (Console.ControlKeyState) 0; bool control = (controlKeyState & (Console.ControlKeyState.RightCtrlPressed | Console.ControlKeyState.LeftCtrlPressed)) != (Console.ControlKeyState) 0; ConsoleKeyInfo consoleKeyInfo = new ConsoleKeyInfo(buffer.keyEvent.uChar, (ConsoleKey) buffer.keyEvent.virtualKeyCode, shift, alt, control); if (!intercept) Console.Write(buffer.keyEvent.uChar); return consoleKeyInfo; }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д