Главная » Просмотр файлов » John.Wiley.and.Sons.Rapid.Mobile.Enterprise.Development.for.Symbian.OS.An.Introduction.to.OPL.Application.Design.and.Programming.May.2005.eBook-LinG

John.Wiley.and.Sons.Rapid.Mobile.Enterprise.Development.for.Symbian.OS.An.Introduction.to.OPL.Application.Design.and.Programming.May.2005.eBook-LinG (779881), страница 41

Файл №779881 John.Wiley.and.Sons.Rapid.Mobile.Enterprise.Development.for.Symbian.OS.An.Introduction.to.OPL.Application.Design.and.Programming.May.2005.eBook-LinG (Symbian Books) 41 страницаJohn.Wiley.and.Sons.Rapid.Mobile.Enterprise.Development.for.Symbian.OS.An.Introduction.to.OPL.Application.Design.and.Programming.May.2005.eBook-LinG2018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 41)

Accuracy can be restored by usingFIRST or LAST on the current view.See BOOKMARK, GOTOMARK, KILLMARK.POSITIONSets the position in the current viewUsage: POSITION x%Makes record number x% the current record in thecurrent view. By using bookmarks and editing the sametable via different views, positional accuracy can belost and POSITION x% could access the wrong record.Accuracy can be restored by using FIRST or LAST onthe current view.POSITION (and POS) exist mainly for compatibilitywith older versions of OPL and you are advised to usebookmarks instead.See BOOKMARK, GOTOMARK, KILLMARK.PRINTDisplays a list of expressionsUsage: PRINT list of expressionsDisplays a list of expressions on the screen. The list canbe punctuated in one of these ways:If items to be displayed are separated by commas,there is a space between them when displayed.If they are separated by semicolons, there are nospaces.Each PRINT statement starts a new line, unless thepreceding PRINT ended with a semicolon or comma.There can be as many items as you like in thislist.

A single PRINT on its own just moves to thenext line.OPL COMMAND LIST243Example: On 1st January 1997CodePRINT "TODAY is", :PRINTDAY;".";MONTH;".";YEARPRINT 1PRINT "Hello"PRINT "Number",1displayTODAY is 1.1.19971HelloNumber 1See also LPRINT, gUPDATE, gPRINT, gPRINTB, gPRINTCLIP, gXPRINT.PUTWrites changes into a databaseUsage: PUTMarks the end of a database’s INSERT or MODIFYphase and makes the changes permanent.See INSERT, MODIFY, CANCEL.RADConverts from degrees to radiansUsage: r=RAD(x)Converts x from degrees to radians.All the trigonometric functions assume angles arespecified in radians, but it may be easier for you toenter angles in degrees and then convert with RAD.Example:PROC xcosine:LOCAL anglePRINT "Angle (degrees)?:";INPUT anglePRINT "COS of",angle,"is",angle=RAD(angle)PRINT COS(angle)GETENDP(The formula used is (PI*x)/180.)To convert from radians to degrees use DEG.244RAISEOPL COMMAND LISTRaises an errorUsage: RAISE x%Raises an error.The error raised is error number x%.

This may beone of the errors listed in OPL error values, or a newerror number defined by you.The error is handled by the error processing mechanism currently in use – either OPL’s own, which stopsthe program and displays an error message, or theONERR handler if you have ONERR on.RANDOMIZESeeds the random number generatorUsage: RANDOMIZE x&Gives a ‘seed’ (start value) for RND.Successive calls of the RND function produce asequence of pseudo-random numbers. If you use RANDOMIZE to set the seed back to what it was at thebeginning of the sequence, the same sequence willbe repeated.For example, you might want to use the same ‘random’ values to test new versions of a procedure.

Todo this, precede the RND statement with the statementRANDOMIZE value. Then to repeat the sequence, useRANDOMIZE value again.Example:PROC SEQ:LOCAL g$(1)WHILE 1PRINT "S: set seed to 1"PRINT "Q: quit"PRINT "other key: continue"g$=UPPER$(GET$)IF g$="Q"BREAKELSEIF g$="S"PRINT "Setting seed to 1"RANDOMIZE 1PRINT "First random no:"ELSEPRINT "Next random no:"ENDIFPRINT RNDOPL COMMAND LIST245ENDWHENDPREALLOCChanges the size of a previously allocated cellUsage: pcelln&=REALLOC(pcell&,size&)Change the size of a previously allocated cell at pcell&to size&, returning the new cell address or zero if thereis not enough memory.See also SETFLAGS if you require the 64K limit to beenforced. If the flag is set to restrict the limit, pcelln& isguaranteed to fit into an integer.See also Dynamic memory allocation.ARMCells are allocated lengths that are the smallest multipleof four greater than the size requested because theARM processor requires a 4-byte word alignment for itsmemory allocation.REMComment markerUsage: REM textPrecedes a remark you include to explain how a program works.

All text after the REM up to the end of theline is ignored.When you use REM at the end of a line you needonly precede it with a space, not a space and a colon.Examples:INPUT a :b=a*.175 REM b=TAXINPUT a :b=a*.175 : REM b=TAXRENAMERenames filesUsage: RENAME file1$,file2$Renames file1$ as file2$. You can renameof file.You cannot use wildcards.You can rename across directories:"\dat\xyz.abc","\xyz.abc" is OK. If you docan choose whether or not to change thethe file.any typeRENAMEthis, youname of246OPL COMMAND LISTExample:PRINT "Old name:" :INPUT a$PRINT "New name:" :INPUT b$RENAME a$,b$REPT$Repeats a stringUsage: r$=REPT$(a$,x%)Returns a string comprising x% repetitions of a$.For example, if a$="ex", r$=REPT$(a$,5) returnsexexexexex.RETURNReturns from a procedureUsage: RETURNorRETURN variableTerminates the execution of a procedure and returnscontrol to the point where that procedure was called(ENDP does this automatically).RETURN variable does this as well, but also passesthe value of variable back to the calling procedure.

Thevariable may be of any type. You can return the valueof any single array element – for example, RETURNx%(3). You can only return one variable.RETURN on its own, and the default return throughENDP, causes the procedure to return the value 0 or anull string.RIGHT$Gets the rightmost characters of stringUsage: r$=RIGHT$(a$,x%)Returns the rightmost x% characters of a$.Example:PRINT "Enter name/ref",INPUT c$ref$=RIGHT$(c$,4)name$=LEFT$(c$,LEN(c)$-4)ROLLBACKCancels the current transaction on the current viewUsage: ROLLBACKCancels the current transaction on the current view.Changes made to the database with respect to thisOPL COMMAND LIST247particular view since BEGINTRANS was called willbe discarded.See also BEGINTRANS, COMMITTRANS.RMDIRRemoves directoriesUsage: RMDIR str$Removes the directory given by str$.

You can onlyremove empty directories.RNDGets a pseudo-random floating point numberUsage: r=RNDReturns a pseudo-random floating point number in therange 0 (inclusive) to 1 (exclusive).To produce random numbers between 1 and n, e.g.between 1 and 6 for a dice, use the following statement:f%=1+INT(RND*n).RND produces a different number every time it iscalled within a program. A fixed sequence can begenerated by using RANDOMIZE. You might beginby using RANDOMIZE with an argument generatedfrom MINUTE and SECOND (or similar), to seed thesequence differently each time.Example:PROC rndvals:LOCAL i%PRINT "Random test values:"DOPRINT RNDi%=i%+1GETUNTIL i%=10ENDPSCI$Converts a number to scientific formatUsage: s$=SCI$(x,y%,z%)Returns a string representation of x in scientific format,to y% decimal places and up to z% characters wide.Examples:SCI$(123456,2,8)="1.23E+05"SCI$(1,2,8)="1.00E+00"SCI$(1234567,1,-8)="1.2E+06"248OPL COMMAND LISTIf the number does not fit in the width specified thenthe returned string contains asterisks.If z% is negative then the string is right-justified.See also FIX$, GEN$, NUM$.SCREENChanges the size of the text windowUsage: SCREEN width%,height%orSCREEN width%,height%,x%,y%Changes the size of the window in which text is displayed.

x%,y% specify the character position of the topleft corner; if they are not given, the text window iscentered in the screen.An OPL program can initially display text to thewhole screen.See SCREENINFO.SCREENINFOGets information about the text screenUsage: SCREENINFO var info%()Gets information on the text screen (as used by PRINT,SCREEN, etc.).This keyword allows you to mix text and graphics.It is required because while the default window is thesame size as the physical screen, the text screen isslightly smaller and is centered in the default window.The few pixels gaps around the text screen, referred toas the left and top margins, depend on the font in use.On return, info%() contains the information.info%() must have at least 10 elements.

The informationis returned at the following indices in info%():KSinfoALeft%KSinfoATop%KSinfoAScrW%KSinfoAScrH%KSinfoAReserved1%12345KSinfoAFont%KSinfoAPixW%KSinfoAPixH%KSinfoAReserved2%KSinfoAReserved3%678910left margin in pixelstop margin in pixelstext screen width in character unitstext screen height in character unitsreserved (window server ID for defaultwindow)unused (font ID for older systems)pixel width of text window character cellpixel height of text window character cellleast significant 16 bits of the font IDmost significant 16 bits of the font IDThese constants are supplied in Const.oph.OPL COMMAND LIST249The font ID is a 32-bit integer under Symbian OS,and therefore would not fit into a single element ofinfo%(). Hence, the least significant 16 bits of the fontID are returned to info%(9) and the most significant 16bits to info%(10).Initially SCREENINFO returns the values for theinitial text screen.

Характеристики

Тип файла
PDF-файл
Размер
3,18 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Как Вы думаете, сколько людей до Вас делали точно такое же задание? 99% студентов выполняют точно такие же задания, как и их предшественники год назад. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6418
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее