Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Transputer occam Screen Output PARallel Processes

  • camgere
  • 2019-06-02
  • 176
Transputer occam Screen Output PARallel Processes
Transputer occam programming software parrallel concurrent CSP Technology paleo-computing
  • ok logo

Скачать Transputer occam Screen Output PARallel Processes бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Transputer occam Screen Output PARallel Processes или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Transputer occam Screen Output PARallel Processes бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Transputer occam Screen Output PARallel Processes

-- Try It Online Occam Emulator
-- https://tio.run/#
-- https://tio.run/#occam-pi
--
#INCLUDE "course.module"
-- This is a remark
-- An indent is two spaces, often used like { or }
PROC hello2 (CHAN BYTE out!)
BYTE e, f, s: -- define several BYTEs
[7]BYTE str: -- BYTE vector from 0 to 6
INT x, y, z: -- INT depends on processor word size, here it is signed 32 bits
INT16 g: -- INTs are signed, they can be positive or negative
INT32 h:
INT64 j:
REAL32 m:
REAL64 n:

-- out ! BYTEs are often used for characters
-- out.byte() decimal value
-- out.int() 32 bit INTs in decimal
-- out.hex() for INT, e.g. #FFFFFFFF
-- out.string() strings of characters are BYTE vectors

SEQ -- Assignments
e := 66 -- BYTE 'B'
f := 'C'
s := ' ' -- space character
str := "EXAMPLE" -- BYTE vector used as character string

x := 0 -- INT
x := x + 1 -- Oooohhhhh, arithmetic!
y := 2147483647
g := 32767
h := 2147483647
j := 9223372036854775807

m := 9876.54E+21 -- REAL
n := -123456.123E-32

-- Output
out! e -- BYTE This output character B, not number 66
out ! s -- space character
out.byte (e, 0, out!) -- Note that this outputs the decimal value, not the character
out.string ("*c*n", 0, out!)
out ! f
out.string ("*c*n", 0, out) -- left off ! on out, doesn't matter
out.string (str, 0, out!)
out.string ("*c*n", 0, out!)
out ! str[4] -- P from EXAMPLE
out.string ("*c*n", 0, out!)

out.int(y, 0, out!) -- INT this is a FUNCTION call, probably to course.module
out.string ("*c*n", 0, out!) -- new line
out.hex(y, 0, out) -- ouput INT to screen as #8 digit hex
out.string ("*c*n", 0, out!) -- new line
x := 7
y, z := x, x + 1 -- mulitple assignments
out.int(y, 0, out!) -- y
out.string ("*c*n", 0, out!)
out.int(z, 0, out!) -- z
out.string ("*c*n", 0, out!)

out.string ("Hello, World!*c*n", 0, out!) -- note carriage return new line
: -- end of process hello2



-- sending INT length BYTE string messages
-- INMOS Limited occam 2 Reference Manual, page 30
-- occam programs act upon variables, channels and timers. A variable has a value and may be assigned
-- a value in an assignment or input. Channels communicate values.
-- Timers produce a value which represent the time. Reference Manual, p. 23
#INCLUDE "course.module"
PROC sendit (CHAN INT::[]BYTE commsone) -- A procedure definition in occam defines a name for a process.
[256]BYTE stringy: -- Note the CHAN type for sendit
INT a, b, c, d:
SEQ
commsone ! 21::"message in a bottle*c*n" -- 21 is message INT length, sent first

a := 11
[stringy FROM 0 FOR a] := "Variation*c*n" -- 0 is first character of stringy, 11 characters long
commsone ! a::[stringy FROM 0 FOR a]

-- let's make it very adjustable
a := 13 -- 13 is length
b := 1 -- 1 is starting character
c := 2 -- 2 is first character to output
d := (a + b) - c -- from first character to output (2) to last character in string (13)
[stringy FROM b FOR a] := "Hello World*c*n" -- 1 is first character of stringy, 13 characters long
commsone ! d::[stringy FROM c FOR d] -- 12 is message INT length, sent first, 2 is the first character sent
-- if output and input requests don't match up exactly you tend to get a message like
-- "KRoC: deadlock: no valid processes found in workspace(s)"
: -- End process sendit


PROC getit (CHAN INT::[]BYTE commsone, CHAN BYTE out)
INT length, n:
[256]BYTE stringy:
SEQ
n := 3 -- ouput message this many times
SEQ i = 0 FOR n
SEQ
commsone ? length::stringy -- reads length from INT at beginning of message
SEQ j = 0 FOR length
out ! stringy[j]
: -- End process getit


PROC sendget (CHAN BYTE out)
CHAN INT::[]BYTE commsone: -- communication channels between Process 1 and Process 2

PAR -- PARallel processes, a uniquely OCCAM thing
-- PAR runs at the hardware instruction level, no operating system involved!
sendit(commsone)
getit(commsone, out)

: -- end of PROC sendget

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]